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

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

1871. LayaBox HelloWorld实战 [ 76%]

...oWorld extends Laya.Scene { constructor() { super(); HelloWorld.instance = this; } onBtnShowClick(){ var dialog = new Laya.Dialog(); dialog.width=300; dialog.height=600; //var bg = new Laya.Image('comp/img_bg.png'); //dialog.addChild(bg); var button = new Laya.Button('comp/button.png'); button.label...

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

1872. skeleton的_onAniSoundStoped清除的时候有时会报undefined错误 [ 76%]

...hannel */ private _onAniSoundStoped(force: boolean): void { for (let len = this._soundChannelArr.length, i = 0; i < len; i++) { let channel = this._soundChannelArr[i]; if (channel.isStopped || force) { !channel.isStopped && channel.stop(); this._soundChannelArr.splice(i, 1); // SoundManag...

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

1873. 创建Laya.PolygonCollider后,页面不显示,导致其他碰撞体也不显示 [ 76%]

...a.PolygonCollider后,页面不显示,导致其他碰撞体也不显示 this.sp = new Laya.Sprite();  let rb = this.sp.addComponent(Laya.RigidBody); let polygonCollider4 = this.sp.addComponent(Laya.PolygonCollider); polygonCollider4.points = "429,1094,433,1094,440,1094,442,1094,446,1094,448,1094...

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

1874. 可能有个昵称叫做“syy”的一只掉进粪坑里的猪会在下面乱叫 [ 76%]

...绍方法   {Laya.loader.create("prefab/预设名字.json",Handler.create(this,onComplete));}private function onComplete(obj:Object):Void{一个预设变量.json = ojb一个sprite = Pool.getItemByCreateFun("自己起一个名字", this.一个预设变量.create, this.一个预设变量);} 2018-12-0...

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

1875. LAYAAIR加载SWF无线循环 [ 76%]

...          mc.height=700;             mc.on("click", this, onAniClick);                 trace("mcwidth:"+mc.width+"mcheight:"+mc.height);                      //  mc.on(Event.LOADED,this,onComp);         //  mc.on(Event.COMPLETE,thi...

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

1876. Texture.getPixels在手机真机Native环境中会报错 [ 76%]

...      if (window.conch) {                 return this._nativeObj.getImageData(x, y, width, height); //this._nativeObj为空!             }             else {                 return this.getTexturePixels(x, y, width, height); ...

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

1877. WXOpenDataViewer 微信开放数据域 是不是不能响应鼠标拖动事件呢? [ 75%]

... Laya.ResourceVersion.enable("version.json", Laya.Handler.create(this, this.onVersionLoaded), Laya.ResourceVersion.FILENAME_VERSION); 和 Laya.AtlasInfoManager.enable("fileconfig.json", Laya.Handler.create(this, this.onConfigLoaded)); 都要删掉。 内涵tv何吓吓 • 2019-03...

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

1878. 入门对一些概念不理解,怎么入坑啊? [ 75%]

...西,比如说为啥教学视频里面都喜欢用Laya.Handler.create(this,this.xxx)来做事件;为啥不能直接this.xxx呢?有什么优点呢?文档是说是从对象池里取,这又是个什么玩意儿,好抽象额。。。。 作为新手,感觉不知道哪里入手额。。...

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

1879. 自己画的view不支持鼠标点击吗? [ 75%]

...1=new View(); btn_1.graphics.drawPath(0, 0, path, {fillStyle: "#123456"}); this.addChild(btn_1); btn_1.mouseEnabled=true; btn_1.on(Event.MOUSE_DOWN, this, onClickBt1);     不管怎么点,在这个点击方法里面是不会执行的  2018-07-09 添加评论 免费帖 --> 分享 微博 QZONE ...

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

1880. 刮刮卡效果实现 [ 75%]

... var interactionArea; var ape; var mouseX = 0; _proto.onInit = function(){ this.guaSpr.cacheAs = "bitmap"; ape = new Sprite(); this.guaSpr.addChild(ape); ape.loadImage("WBSign/img_guakaituceng.png"); ape.on(Event.MOUSE_MOVE, this, onMouseMove); interactionArea = new Sprite(); interactionArea.blendMo...

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