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

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

821. 添加或修改物理ChainCollider属性points时,报错 [ 68%]

...is.bullet); flyer.pos(Laya.stage.mouseX, Laya.stage.mouseY); this._gameBox.addChild(flyer); this._chains.points="118,99,158,70,218,99,258,70,318,99,358,70,418,99,458,70,518,99,558,70"; } /**开始游戏,通过激活本脚本方式开始游戏*/ startGame(): void { if (!this._started) { t...

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

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

...800); //显示一个图片 sp = Sprite.fromImage("res/bg.jpg"); Laya.stage.addChild(sp); //显示一个动画 var ani:Animation = new Animation(); ani.loadAtlas("res/fighter.atlas"); ani.play(); ani.pos(400, 200); sp.addChild(ani); Laya.stage.on("keydown", this, onKeyDown); Stat.show(); } private fu...

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

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

...800); //显示一个图片 sp = Sprite.fromImage("res/bg.jpg"); Laya.stage.addChild(sp); //显示一个动画 var ani:Animation = new Animation(); ani.loadAtlas("res/fighter.atlas"); ani.play(); ani.pos(400, 200); sp.addChild(ani); Laya.stage.on("keydown", this, onKeyDown); Stat.show(); } private fu...

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

824. 提示资源重复加载 [ 68%]

...on.createFrames([swimpoorpath01,swimpoorpath02],"swimpoolani"); Laya.stage.addChild(this.swimpoolani); this.swimpoolani.play(0,true,"swimpoolani"); this.swimpoolani.interval = 500;         }     onEnable(): void { }  onDisable(): void { } }       esources already exist,is repeated load...

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

825. 文本-禁止编辑 [ 68%]

...#666666"; inputText.color = "#ffffff"; inputText.fontSize = 20; Laya.stage.addChild(inputText); } })();module laya { import Input = Laya.Input; import Stage = Laya.Stage; import Browser = Laya.Browser; import WebGL = Laya.WebGL; export class Text_Editable { constructor() { // 不支持WebGL时自动...

来源: Laya_示例 发布时间: 20251209

826. js环境下使用Loader加载图片在Sprite对象的.on函数无效 [ 68%]

...CLICK,this,readnext);         //添加到舞台     Laya.stage.addChild(this.bgimg);     }     function onLoading(progress)     {         console.log("加载进度: " + Math.floor(progress*100)+"%");     }     function onError(err)     {         co...

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

827. 代码创建精灵监听不到事件? [ 68%]

...ure(texture); box.on(Laya.Event.MOUSE_UP,this,onhh); box.pos(36, 85); this.addChild(box); function onhh(params) { console.log("--------------------------------hhhhhhhhhhh- "); }

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

828. 同一个Animation,创建多个实例只能显示一个(测试项目已上传) [ 68%]

...l.getItemByClass("wheel", wheel); p.pos(i*90+100,200); p.init(); roleLayer.addChild(p) } /////////////wheelas.as public function wheel(){ this.graphics.drawCircle(0,0,40,"#fff"); _wheel= new Animation(); _wheel.loadAnimation("wheeling.ani"); } public function init():void{ t...

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

829. 重复使用Laya.Sprite3D.load加载同一个lh类型的资源,发现第二次加载到的资源是无效的 [ 68%]

...ll, false)); this.scene3d = Loader.getRes(sceneUrl) as Scene3D; Laya.stage.addChild(this.scene3d); 189*****909 • 2020-07-04 10:57 @熊猫大侠:需要释放掉,然后再次载入。 189*****909 • 2020-07-04 10:59 @熊猫大侠:考虑到资源量很大,需要从内存清理掉。不然累计...

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

830. 请问下键盘事件的监听只能用stage么?其他对象监听不起作用,谢谢 [ 68%]

...使用 var sp = new Sprite(); sp.width = 720; sp.height = 1280 Laya.stage.addChild(sp) sp.on(laya.events.Event.KEY_DOWN, this, this.onkeyDown); 就不能监听到键盘事件呢,这是怎么回事呢? 2018-01-12 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已...

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