大约有 1,562 项符合查询结果, 库内数据总量为 31,671 项。 (搜索耗时: 0.0061 秒)
...} Animation.createFrames(url,"myFighter"); fly=new Animation(); Laya.stage.addChild(fly); fly.play(0,true,"myFighter"); } } 其他案例请参考:LayaAir开发实战-------Role.as文件也有相关使用方式,仅供参考。 2016-06-13 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个...
来源: Laya_社区 发布时间: 20160610
...也可以继续在laya中对camera进行操作: var scene = Laya.stage.addChild(Laya.Scene.load("res/layaScene.ls")); scene.once(Laya.Event.HIERARCHY_LOADED, this, function (sceneTemp) { var camera = sceneTemp.getChildByName("Main Camera"); camera.transform.translate(new Laya.Vector3(0, 0, 200)); ...
来源: Laya_社区 发布时间: 20170828
... this.skeleton = this.templet.buildArmature(); Laya.stage.addChild(this.skeleton); this.skeleton.pos(laya_width/2,laya_height/2); this.skeleton.scale(0.5, 0.5); this.skeleton.on(Event.STOPPED, this, this.play); this.play(); } ...
来源: Laya_社区 发布时间: 20211013
...ig.tips.haveNoTheChar, char); } sp.texture = tx; this.chars.push(sp); this.addChild(sp); } this.sortCharsByAlign(this._align); } /** * 水平对齐方式 */ public set align(v: string) { if (v === this._align) { return; } this._align = v; this.sortCharsByAlign(v); } public get align(): string { retu...
来源: Laya_社区 发布时间: 20180302
...hildAt(0).clone(); ele.transform.position=new Laya.Vector3(0, 0, 0); scene.addChild(ele); ... ele.transform.rotate(new Laya.Vector3(10, 0, 0), true); //这里会有效 ele.transform.localRotation=new Laya.Quaternion(0, 0,0,0); //这里也还是有效的 ele.transform.rotate(new Laya.Vector3(30, 0, 0...
来源: Laya_社区 发布时间: 20170323
...d(): void { //实例UI界面 var testUI: TestUI = new TestUI(); Laya.stage.addChild(testUI); console.log("myref-onloaded", testUI.myref.getBounds()); console.log("mypan-onloaded", testUI.mypan.getBounds()); Laya.stage.event(Laya.Event.RESIZE) console.log("myref-event_resize", testUI.myref.getBounds(...
来源: Laya_社区 发布时间: 20170720
...aya.stage.bgColor = '#23238E'; //将文本内容添加到舞台 Laya.stage.addChild(txt); } } new GameMain(); 海货 • 2018-07-15 16:17 上边是代码 wq • 2018-08-01 14:00 那不是很麻烦,要全部注释忘。 nonfiction • 2018-09-04 11:33 1.7.19,新建示例项目,发布到微信...
来源: Laya_社区 发布时间: 20180715
...LoadProgressBinder.bindAll) this.progressUI.UIMenu.value = 0.0; Laya.stage.addChild(this.progressUI.displayObject); Laya.timer.loop(100, this, this.updataPosition); this.loadMainDatas(); } public updataPosition() { this.progressUI.setPosition(Laya.stage.width / 2, Laya.stage.height / 2); } public lo...
来源: Laya_社区 发布时间: 20171204
...ont; txt.leading = 15; //把文本添加到场景中的bf节点下 this.bf.addChild(txt); } } ``` 上面的代码运行效果如下图的蓝色框内所示:  > 上图非蓝色框的是FontClip组件的效果,如果只是简单的单行位图文本,FontClip也可以满足,...
来源: Laya2.0_文档 发布时间: 20210715
...conSpr = new Sprite(); iconSpr.width = 1280; iconSpr.height = 640; iconSpr.addChild(img); btn.on(Event.CLICK,this,runGame1); } private function runGame1():void { xNum = Math.random()*7 - 3; yNum = Math.random()*7 - 3; Laya.timer.loop(20,this,onRun); Laya.timer.frameLoop(10,this,refresh); } private f...
来源: Laya_社区 发布时间: 20180113