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

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

271. 鼠标down事件怎么不一定触发up事件呀,快速拖动某个物品是否只能检测down,不能检测到up,很奇怪的机制 [ 75%]

...一份demo上来我看看 lengyu • 2018-04-19 15:11 @w1114367261: spr.on(Event.MOUSE_DOWN, this, onStartDrag,arr); spr.on(Event.MOUSE_UP,this, onStopDrag,arr);,我就这两个函数,监听spr,这个sprite对象,然后再舞台上死命甩,就有可能会导致up事件不会触发呢,...

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

272. laya.d3.core.Transform3D_API3.0 [ 75%]

...sform3D Class Transform3D Transform3D 类用于实现3D变换。 Hierarchy EventDispatcher Transform3D NativeTransform3D Index Properties tmpVec3 Accessors localMatrix localPosition localPositionX localPositionY localPositionZ localRotation localRotationEuler localRotationEulerX localRotationEulerY ...

来源: Laya3.0_api 发布时间: 20231115

273. 取消监听鼠标移动事件,取消不了 [ 75%]

取消监听鼠标移动事件,取消不了 Laya.stage.off(Laya.Event.MOUSE_MOVE,this,null); 第三个参数是函数,不能为null吗?是不是和on绑定时的同一个函数,如果on里面用匿名函数,off第三个参数怎么写? 2018-06-23 添加评论 免费帖 --> 分享 微博...

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

274. 精灵添加名称 [ 75%]

...  sp = project.drawsomething(20, 20+60*i, "#eeb9b3");         sp.on(Event.CLICK,this, onsp);         Laya.stage.addChild(sp);   }   private function onsp(e:Event){              console.log("监听到按钮"+e.target);              console.log((e.target.getChildAt(0) as ...

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

275. 关于3d场景上Button点击事件顺序问题 [ 75%]

...按钮button。 2,在场景中加入了鼠标点击事件  Laya.stage.on(Event.MOUSE_DOWN,this,sceneClick);   private function sceneClick():void {     trace("scene clicked"); }   3,在button上添加按钮功能 button.on(Event.CLICK,this,onBtn); private function onBtn(e:Event):void {     e....

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

276. 陀螺仪和加速计使用问题 [ 75%]

陀螺仪和加速计使用问题 Laya.Gyroscope.instance.on(Laya.Event.CHANGE,this,this.onDeviceorientation);  Laya.Accelerator.instance.on(Laya.Event.CHANGE,this,this.onMotoin); 官网陀螺仪和加速计例子中的上面两句运行时都报 Cannot read property 'instance' of undefined 的错...

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

277. 打飞机点开始游戏加载飞机动画不出来,点重新开始,才出来,新手求助! [ 75%]

...出来 function onLoaded() { start = new GameStartUI(); start.btn_start.on(Event.MOUSE_UP,this,gameInit) Laya.stage.addChild(start); } function gameInit() { map = new GameBgUI(); Laya.stage.addChild(map); play = new GamPlayUI(); Laya.stage.addChild(play); hero = new Hero("hero", 25) hero.pos(100,200...

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

278. 分享:为List组件下Item(Box)下的Button(或其他组件)进行监听! [ 75%]

...可!var Loader = laya.net.Loader; var Handler = laya.utils.Handler; var Event = laya.events.Event; // 创建TestPageUI的子类 function TestUI() { TestUI.super(this); //list赋值,先获得一个数据源数组 var arr = ; for (var i = 0; i < 100; i++) { arr.push({label: "item " + i, clip: i...

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

279. 事件函数作用域问题 [ 75%]

事件函数作用域问题 1. this.btn_Login.on(Laya.Event.CLICK, null, ()=>{ if (this.loginDig) { this.loginDig.removeSelf(); this.loginDig.destroy(); } 2.this.btn_ok.on(Laya.Event.RIGHT_CLICK, this, this.OnBut_Open); OnBut_Open() : void { this.removeSelf(); this.destroy(); } 就是这两个...

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

280. laya.d3.resource.RenderTexture_API3.0 [ 75%]

... _removeReference _setCPUMemory _setCreateURL _setGPUMemory _start destroy event getData gpuCompressFormat hasListener isCreateFromURL off offAll offAllCaller on once recreate clearPool createFromPool destroyUnusedResources recoverToPool Constructors constructor new RenderTexture(width: number, heig...

来源: Laya3.0_api 发布时间: 20231102