• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 275 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0039 秒)

141. Sprite-新手引导 [ 66%]

...Container.loadImage("res/guide/crazy_snowball.png"); gameContainer.on(Laya.Event.CLICK, this, this.nextStep); // 引导所在容器 guideContainer = new Sprite(); Laya.stage.addChild(guideContainer); guideContainer.cacheAs = "bitmap"; // 绘制遮罩区,含透明度,可见游戏背景 maskArea =...

来源: Laya2.0_示例 发布时间: 20251130

142. 关于event中只读属性touches,问题,求解 [ 65%]

关于event中只读属性touches,问题,求解 主类: package { import laya.display.Text; import laya.events.Event; import laya.webgl.WebGL; public class DemoTouch { public function DemoTouch() { Laya.init(800, 600, WebGL); Laya.stage.bgColor = "#232628"; var txt:Text = new Text(); txt.text...

来源: Laya_社区 发布时间: 20170519

143. 【求助】怎么在自定义对象进行实例化的时候,给它绑定监听事件 [ 65%]

...ld(list); } private function onListRender(food):void{ trace(food); food.on(Event.CLICK,this.test); } private function test():void{ trace("test"); }我换了一种思路,是在实例化Food这个对象的时候,在构造函数里,就绑定事件监听函数。但是生成的JS代码,监听范...

来源: Laya_社区 发布时间: 20180407

144. 鼠标事件能否在有图形的区域感应,特别是子项坐标为负数时(已经找到问题) [ 65%]

...(已经找到问题) package { import laya.display.Sprite; import laya.events.Event; public class MainUi extends Sprite { private var testPan:Sprite; public function MainUi() { super(); this.graphics.drawRect(0,0,500,500,"#fff0cc"); testPan = new Sprite(); testPan.name = "testPan"; this.addChild...

来源: Laya_社区 发布时间: 20161124

145. 改变位置后,点击区域不生效了 [ 65%]

...点击区域不生效了 package { import laya.display.Sprite; import laya.events.Event; import laya.renders.Render; public class MoveTest { public function MoveTest() { Laya.init(600,600); var sp:Sprite = new Sprite(); sp.autoSize=true; sp.graphics.drawRect(0,0,100,100,"#ff0000"); sp.on(Event.CLICK...

来源: Laya_社区 发布时间: 20171226

146. Sprite3D的Layer(JavaScript-3D基础(JS)-LayaAir3D之精灵) [ 65%]

...4; ...... //切换图层按钮事件监听 this.changeActionButton.on(Laya.Event.CLICK, this, function():void { this.camera.removeAllLayers(); this.layerIndex ++; this.camera.addLayer(this.layerIndex%4 +1); this.camera.addLayer(5); }); ``` ![](img/1.gif)(图1)

来源: Laya2.0_文档 发布时间: 20210715

147. Sprite3D的Layer(TypeScript-3D基础(TS)-LayaAir3D之精灵) [ 65%]

...4; ...... //切换图层按钮事件监听 this.changeActionButton.on(Laya.Event.CLICK, this, function():void { this.camera.removeAllLayers(); this.layerIndex ++; this.camera.addLayer(this.layerIndex%4 +1); this.camera.addLayer(5); }); ``` ![](img/1.gif)(图1)

来源: Laya2.0_文档 发布时间: 20210715

148. parameter 2 is not of type 'WebGLTexture'. [ 64%]

..._start = this.getChildByName('btn_start') as Laya.Image; btn_start.on(Laya.Event.CLICK,this,()=>{ // 加载资源足以播放 if(videoElement.readyState == 4){ videoElement.play(); } }); 附件 : --> demo.zip 2020-07-22 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结...

来源: Laya_社区 发布时间: 20200722

149. 摄像机捕捉目标(JavaScript-3D基础(JS)-LayaAir3D之Camera) [ 64%]

...0, 1, 0); ``` ```typescript //点击事件 this.changeActionButton.on(Laya.Event.CLICK, this, function(){ this.index++; if (this.index % 3 === 1 ){ //摄像机捕捉模型目标 this.camera.transform.lookAt(this.box.transform.position, this._up); } else if (this.index % 3 === 2){ //摄像机捕捉...

来源: Laya2.0_文档 发布时间: 20210715

150. 摄像机捕捉目标(TypeScript-3D基础(TS)-LayaAir3D之Camera) [ 64%]

...0, 1, 0); ``` ```typescript //点击事件 this.changeActionButton.on(Laya.Event.CLICK, this, function(){ this.index++; if (this.index % 3 === 1 ){ //摄像机捕捉模型目标 this.camera.transform.lookAt(this.box.transform.position, this._up); } else if (this.index % 3 === 2){ //摄像机捕捉...

来源: Laya2.0_文档 发布时间: 20210715