大约有 1,616 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0060 秒)
Laya_社区(986) Laya2.0_文档(192) Laya_示例(138) Laya2.0_示例(101) Laya3.0_api(61) Laya2.0_api(57) laya_api(53) Laya3.0_文档(28)
...ngle(rect.x-100,rect.y-100,200,200); // rect.hitArea = hitArea; Laya.stage.addChild(rect); //增加鼠标事件 rect.on(Event.MOUSE_DOWN, this, mouseHandler); rect.on(Event.MOUSE_UP, this, mouseHandler); rect.on(Event.CLICK, this, mouseHandler); rect.on(Event.RIGHT_MOUSE_DOWN, this, mouseHandler); r...
来源: Laya_社区 发布时间: 20180205
Error: Layer value can be null. 一开始正常后来把 Laya.stage.addChild(Gamesce.gameFig); 改为Laya.stage.addChildAt(Gamesce.gameFig,1); 报这个错误,再改为Laya.stage.addChild(Gamesce.gameFig); 游戏一直报Error: Layer value can be null.,游戏崩了。。。。。 有大神知...
来源: Laya_社区 发布时间: 20181102
...c.graphics.drawTexture(Laya.loader.getRes(picUrl), picX, picY); Laya.stage.addChild(pic); } } } Main.as package { import laya.display.*; import laya.resource.Texture; import laya.ui.Image; import laya.utils.Handler; import addPic; public class Main { private var bgImage:Image; private var bgRes:S...
来源: Laya_社区 发布时间: 20170522
...k); sp= new Sprite(); sp.name='base'; sp.loadImage("logo.png"); Laya.stage.addChild(sp); } private function onClick():void { var htmlsss:String=(Laya.stage.getChildAt(0) as Sprite).drawToCanvas(100,100,0,0).getCanvas().toDataURL(); var sp2:Sprite = new Sprite(); sp2.name='drawCanvas'; sp2.x = 300; s...
来源: Laya_社区 发布时间: 20170523
...个UI实例 var plan = new ui.TimeLineUI(); //添加到舞台 Laya.stage.addChild(plan); //播放UI场景中的动画 plan.crashed.play(); }运行时发现ui变量不存在,打控制台打ui,Laya.ui,Laya.TimeLineUI均发现不存在,在文档中也搜到不TimeLineUI的文档,请问这个API...
来源: Laya_社区 发布时间: 20190217
...ke(): void { let sprite = new Laya.Sprite(); // 添加到舞台 Laya.stage.addChild(sprite); } 3.2 显示图片 图片的显示是游戏开发的基础,Sprite类中用于显示图片是 Sprite.loadImage 和 Sprite.texture。 3.2.1 loadImage /** * <p>加载并显示一个图片。相当于加...
来源: Laya3.0_文档 发布时间: 20251010
....changeHandler = new Handler(this, onChange); //加载到舞台 Laya.stage.addChild(this.hScrollBar); //创建提示信息 createPromptText(this.hScrollBar) } /***创建提示信息***/ function createPromptText(scrollBar) { //实例化提示信息 this.promptText = new Text(); //提示框字体 thi...
来源: Laya2.0_文档 发布时间: 20210714
...Sprite(); _parent.graphics.drawRect(0, 0, 500, 500, '#ff0000'); Laya.stage.addChild(_parent); var _child = new Sprite(); _child.graphics.drawRect(0, 0, 50, 50, '#336699'); _parent.addChild(_child);就像上面那样,我需要在addChild的时候,_child默认在_parant的左下角~按上面的方...
来源: Laya_社区 发布时间: 20170222
...lor = "#FFFFFF"; letter.font = "Impact"; letter.fontSize = 110; Laya.stage.addChild(letter); return letter; } } }
来源: Laya_示例 发布时间: 20251209
...境光颜色是不会显示的! var directionLight:DirectionLight = scene.addChild(new DirectionLight()) as DirectionLight; directionLight.ambientColor = new Vector3(0.6, 0.6, 0.6); directionLight.specularColor = new Vector3(0.6, 0.6, 0.6); directionLight.diffuseColor = new Vector3(0.6, 0.6, 0.6); d...
来源: Laya_社区 发布时间: 20170319