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

大约有 1,144 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0053 秒)

901. Texture内存回收(ActionScript-2D进阶篇(AS3)-性能优化) [ 56%]

... ani.play(); ani.pos(400, 200); sp.addChild(ani); Laya.stage.on("keydown", this, onKeyDown); Stat.show(); } private function onKeyDown(e:Event):void { if (e.keyCode === Keyboard.H) { sp.visible = false; //隐藏界面,清理资源 Laya.loader.clearTextureRes("res/bg.jpg"); Laya.loader.clearTexture...

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

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

...oSize=true; sp.graphics.drawRect(0,0,100,100,"#ff0000"); sp.on(Event.CLICK,this,onClick); Laya.stage.addChild(sp); } private function onClick(event:Event):void{ Render._mainCanvas.source.style.left = "100px"; Render._mainCanvas.source.style.top = "100px"; trace("onClick"); } } } 就这么一段简...

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

903. 动画状态机详解 · LayaAir3.0文档 · LAYABOX [ 56%]

...index: number, playstate: Laya.AnimatorState | Laya.AnimatorState2D) { ... this.model = animator.owner as Laya.Sprite3D;//得到Cube节点 } ... /** * 动画状态退出时执行。 */ onStateExit(): void { console.log("动画退出了"); //平移操作 let position = new Vector3(1, 1, 1); this.mode...

来源: Laya3.0_文档 发布时间: 20230804

904. TimeLine运行的小问题 [ 56%]

...ddChild(sp); var timeLine:TimeLine=new TimeLine(); timeLine.on(Event.LABEL,this,onLabel); timeLine.addLabel("A",0).to(sp,{rotation:360},700) .addLabel("B",0).to(sp,{scaleY:0.7},200) .addLabel("C",0).to(sp,{scaleY:1},200); timeLine.play(0,false); } private function onLabel(text:String):void { trace(t...

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

905. touches一直为undefined [ 56%]

touches一直为undefined Laya.stage.on(Laya.Event.MOUSE_DOWN, this, onCtrlMoveRockerTouchDown); ......   function onCtrlMoveRockerTouchDown(e) {     console.log("onCtrlMoveRockerTouchDown()");     var touches = e.touches;     if(touches) {     ...取出前两个touch进行计算     } }...

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

906. laya.d3.core.light.PointLight_API3.0 [ 56%]

...器。功能同Laya.timer.clearTimer()。 Parameters caller: any 执行域(this)。 method: Function 结束时的回调方法。 Returns void clone clone(): Node Inherited from RenderableSprite3D.clone Defined in laya/d3/core/Sprite3D.ts:300 克隆。 Returns Node 克隆副本。 contains contains(n...

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

907. hBox使用问题 [ 55%]

hBox使用问题 Laya.loader.load(picAy,Handler.create(this, onAssetLoaded)) private function onAssetLoaded():void { for(var i:int=0;i<picAy.length;i++) { var texture:Texture= Loader.getRes(picAy); var ape:Sprite = new Sprite; //ape.x=i*(stageWidth/4) //Tween.to(ape, { x : i*(stageWidth/4) },150...

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

908. dialog 遮挡 [ 55%]

...log("444",400,400); createDialog("555",500,500); Laya.stage.on(Event.CLICK,this,onClick); } private function onClick():void { alert(Dialog.manager.numChildren+"");//manager是DialogManager的实例,创建多少个dialog,manager下就有多少的子对象 var dia:Dialog=Dialog.manager.getChildAt(...

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

909. 微信小游戏与加载图片时不会触发erroe事件 [ 55%]

...与加载图片时不会触发erroe事件 Laya.loader.on(Laya.Event.ERROR, this, function(){ console.log("err"); }); Laya.loader.load([{url:"res/general/test.png",type:laya.net.Loader.IMAGE}]); 2018-09-26 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与...

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

910. 父物体旋转会导致子物体的世界坐标系不正确?(附demo) [ 55%]

...子不旋转的时候,我在代码中动下面圆盘的transform.positionthis.block = s.getChildByName("target_root").getChildByName("PendulumCircleTarget").getChildByName("MoveBlockPivot").getChildByName("TargetGuard") as Laya.Sprite3D; Laya.stage.on(Laya.Event.KEY_PRESS, this, this.KeyPress); th...

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