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

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

761. 2D性能优化 · LayaAir3.0文档 · LAYABOX [ 61%]

....Stat.show(); var textBox=new Laya.Sprite(); for(var i=0;i<10000;i++) { this.text=new Laya.Text(); this.text.text=(Math.random()*100).toFixed(0); this.text.color="#CCCCCC"; this.text.x=Math.random()*550; this.text.y=Math.random()*400; textBox.addChild(this.text); } Laya.stage.addChild(textBox); }...

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

762. sprite 设置为静态变量后,无法从舞台移除 [ 61%]

...mage("background.jpg"); Laya.stage.addChild(sp); Laya.stage.on(Event.CLICK,this,onClick); function onClick():void { // TODO Auto Generated method stub Laya.stage.off(Event.CLICK,this,onClick); Laya.stage.removeChild(sp); Loader.clearRes("background.jpg"); sp.destroy(); } } } } 2016-09-05 0 0 分享 ...

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

763. 背景音乐来回切换报错 [ 61%]

...null         Laya.loader.load("res/dreams.mp3",Laya.Handler.create(this,function(){             dreamsSound = Laya.SoundManager.playMusic("res/dreams.mp3")         }))          let mainSound:Laya.SoundChannel = null;         this.btn_sound.on(Laya.Event.C...

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

764. 如何实现3d遮罩效果? [ 61%]

...a1.addComponent(CameraMoveScript); } private function loadUI():void { var _this:D3Base_TargetTexture = this; Laya.loader.load(["../../../../res/threeDimen/ui/button.png"], Handler.create(null, function():void { var btn:Button = new Button(); btn.skin = "../../../../res/threeDimen/ui/b...

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

765. 使用Tween.to完成回调异常! [ 61%]

使用Tween.to完成回调异常! Tween.to(this.floatTxt, {y:-30}, 600, Ease.expoOut, Handler.create(this,onFloatComplete)); protected function onFloatComplete(callBack:Function):void {  this.removeSelf(); } 我用这个缓动来做飘字效果,完成回调的时候,把飘字对象在场景...

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

766. img点击事件。点击图片外,也触发了事件。请问怎么解决 [ 61%]

....Stage.ALIGN_MIDDLE; Laya.loader.load("res/img/m1.jpg",Laya.Handler.create(this,load)); function load(){ let ctn2=new Laya.Sprite(); Laya.stage.addChild(ctn2); var gq=new Laya.Sprite(); gq.loadImage("res/img/m1.jpg",100,100,100,100);   ctn2.addChild(gq); gq.on(Laya.Event.CLICK,this,Is);   }  func...

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

767. TypeError: ele.render is not a function [ 61%]

...序报错window.focus is not a function 调用动画结束on方法,报错this.zombieAnimator.on is not a function laya加载unity插件导出的场景 physics3D is not a function 鼠标自定义样式官方有支持吗,Laya.Mouse.hide()会报Uncaught TypeError: Cannot read property 'cursor' of u...

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

768. 关于说明文档实战篇《微信飞机大战》的问题 [ 61%]

...的,我反馈一下 mrtian • 2018-10-09 18:40 谢谢回复,不过“this.roleAni.on(Laya.Event.COMPLETE,this,this.onCompleteAni);”这个代码不应该是监听动画播放完成的吗 mrtian • 2018-10-09 18:55 工程代码我更新了,mp3音频文件加载失败的问题,不知道是...

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

769. 射线一直无法获取物体 [ 61%]

...prite3D.load("./test.lh"));     qb_pet.once(Laya.Event.HIERARCHY_LOADED, this, function(){         qb_pet.addComponent(Laya.SphereCollider);     });   设置射线:    Laya.timer.frameLoop(1, null, checkHit);     var hit = new Laya.RaycastHit();     var point = new Laya.Vector2(); ...

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

770. ProtoBuf 其他消息类型怎么使用 [ 61%]

...g 昨晚脑子短路了。睡觉时才想到这样弄。var _NetData = new this.UserModel();             var _NetMessageHead=new this.HeadModel();             _NetMessageHead.set('bMainID', head[0]);             _NetMessageHead.set('bAssistantID', head[1]);         ...

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