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

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

2731. 微信飞机大战 升级版,包含跟踪弹,散弹,道具,积分,难度 [ 62%]

...位置,   这个可以用道具点击事件的阻止事件冒泡来解决 this.on(Laya.Event.MOUSE_DOWN, this, function (e) { e.stopPropagation();//阻止冒泡 console.log('@_@' + e.stageX, e.stageY); }); 另外,能分享一下,你的导弹是怎么做的吗?谢谢 2017-09-19 0 1 分享 微...

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

2732. 设置滤镜(JavaScript-LayaAir基础篇(JS)-位图) [ 62%]

...; Laya.stage.bgColor = "#232628"; Laya.loader.load(ApePath, Handler.create(this, setup)); })(); function setup() { normalizeApe(); makeRedApe(); grayingApe(); } function normalizeApe() { var originalApe = createApe(); apeTexture = Laya.loader.getRes(ApePath); originalApe.x = (Laya.stage.width - apeT...

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

2733. 两个问题都关于LayaAir的ios真机 [ 62%]

...;& _selected) return; if(e.type==Event.MOUSE_DOWN){ QuickUtils.addDark(this,true); }else{ QuickUtils.addDark(this,false); } if (e.type === Event.CLICK) { toggle && (selected = !_selected); _clickHandler && _clickHandler.run(); return; } !_selected && (state = stateMap[e.t...

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

2734. 加载同一个json文件第一次正常,第二次json文件里面的数据就只有一条了。 [ 62%]

...个回复 Yangcy 赞同来自: Laya.loader.load("abc.json", Handler.create(this, onAssetLoadedSound), Handler.create(this, progressHandler), Loader.SOUND);   第一次加载出来: [list=none] [*]0: {column: "0", duration: "0", mode: "点", time: "3076"}[/*] [*]1: {column: "0", duratio...

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

2735. 1.7版本要初始化后有些代码才能用了 [ 62%]

...t; "use strict"; var test = {}; test.text = new laya.display.Text(); // in this line is error , so you can't defined class before "Laya.init" Laya.init(800,600); //test.text = new laya.display.Text(); // in this line is right test.text.text = "dsafdsdsada"; test.text.color = "#ff0000"; Laya.stage.ad...

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

2736. 如何启用摇一摇 [ 61%]

...r_yao1yao=(function(){ function Controller_yao1yao(model){ /*__JS__ */var _this=this; /*__JS__ */_model=model; /*__JS__ */var SHAKE_THRESHOLD=100; /*__JS__ */var last_update=0; /*__JS__ */var x=y=z=last_x=last_y=last_z=0;; /*__JS__ */var canShake=1; /*__JS__ */if (window.DeviceMotionEvent){window.ad...

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

2737. 图片使用pivotX参数后,再对图片添加遮罩会出现效果不对。 [ 61%]

...32628";         Laya.loader.load("../../res/bg2.png", Handler.create(this, setup));     })();     function setup()     {         var bg = new Sprite();         bg.loadImage("../../res/bg2.png");         Laya.stage.addChild(bg);         bg2 = new Sprite();    ...

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

2738. 分包项目, 加载js时报错 [ 61%]

...为黑色             txt.color = '#ffffff';             this.addChild(txt);                          var v:View = new View();             v.graphics.drawCircle(50, 50, 100, "#000000");             v.pos(100, 100);             this.addCh...

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

2739. 组件装饰器说明 · LayaAir3.3 · 引擎文档 · LAYABOX [ 61%]

... number = 0; @property( { type : Number } ) get weight() : number { return this._weight; } //如果没有 Setter,则 weight 为只读属性 set weight(value: number) { this._weight = value; } } 2.3 是否序列化保存 serializable 通过装饰器定义为组件属性后,默认状态下,属...

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

2740. 音频 · LayaAir3.3 · 引擎文档 · LAYABOX [ 61%]

...去舞台焦点(切出游戏)的处理 Laya.stage.on(Laya.Event.BLUR, this, () => { _sound.stop(); }); //获得舞台焦点(切回游戏)的处理 Laya.stage.on(Laya.Event.FOCUS, this, () => { _sound.play(0); }); …… Copyright ©Layabox 2025 all right reserved,powered by LayaAir E...

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