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

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

431. 如何启用摇一摇 [ 76%]

... last_z = 0;'); __JS__('var canShake = 1'); __JS__('if (window.DeviceMotionEvent){window.addEventListener("devicemotion", deviceMotionHandler, false)'); __JS__('}else{alert("你的设备不支持DeviceMotion事件");}'); __JS__('function deviceMotionHandler(eventData){var acceleration = eventData.ac...

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

432. 左右上下能拖拽地图添加on事件报错 [ 76%]

...: 4 人 linyewen • 2022-02-25 17:45 这么修改也会报错吧,this._events[type]是个数组 linyewen • 2022-02-28 11:05 @linyewen:况且增加的this._events[type]上面不是已经判断过了吗 Laya_Yan • 2022-02-28 11:52 @linyewen:你按照图中还会报错吗?报错的话提供个...

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

433. Dialog的onShow方法重写无效 [ 76%]

...写这样的代码: override protected function initialize():void { on(Event.ADDED, this, onShow); on(Event.REMOVED, this, onHide); } protected function onShow():void { } protected function onHide():void { }我创建的View类 重写onShow方法可以正常使用,但dialog重写就没用,我...

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

434. 请问怎么把arraybuffer作为图片显示出来 [ 76%]

...行的   求大神帮忙 let xhr = new Laya.HttpRequest(); xhr.once(Laya.Event.COMPLETE, this, this.completeHandler); xhr.once(Laya.Event.ERROR, this, this.errorHandler); xhr.send("https://ask.layabox.com/static ... ot%3B, "", "get", "arraybuffer"); private completeHandler(data: ArrayBuffer) { //...

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

435. 分享:如何为spine(龙骨)动画添加CLICK事件! [ 76%]

...是hitArea,如下所示 (function () { var Templet = Laya.Templet; var Event = Laya.Event; var Browser = Laya.Browser; var Handler = Laya.Handler; var WebGL = Laya.WebGL; var mFactory; var mArmature; (function () { Laya.init(Browser.width, Browser.height, WebGL); startFun(); })(); function startFu...

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

436. laya.display.Node [ 76%]

...| All Classes | Index | Frames No Frames NodeProperties | Methods | Events Packagelaya.displayClasspublic class NodeInheritanceNode EventDispatcher ObjectSubclasses Sprite Node 类是可放在显示列表中的所有对象的基类。该显示列表管理 Laya 运行时中显示的所有对...

来源: Laya2.0_api 发布时间: 20190513

437. Uncaught TypeError: Cannot read property 'XXX' of undefined [ 76%]

...rawRect(0, 0, 515, 515, "#996633", "#333333");             spe.on(Event.MOUSE_DOWN, spe, onMouseDown);             Laya.stage.on(Event.MOUSE_UP, this, onMouseUp);             Laya.stage.on(Event.MOUSE_OUT, this, onMouseUp);   } private function onMouseDown(e:Event):void {...

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

438. web端ios这边加载压缩的图片加载报错 [ 76%]

...修改 complete(data) { this._data = data; if (this._customParse) { this.event(Event.LOADED, data instanceof Array ? [data] : data); } else { this._http.offAllCaller(this); Loader._loaders.push(this); if (!Loader._isWorking) Loader.checkNext(); } } 2020-02-17 0 0 分享 微博 QZONE 微信 为什么...

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

439. ReferenceError: Loader is not defined 搞不懂引擎原生的也会报这个错? [ 76%]

...veControl);  //点击提示文字,开始游戏 this.label_start.on(Laya.Event.CLICK, this, this.onTipClick); //this._loveControl.startGame();  //点击重置按钮,重新开始 this.button_reset.on(Laya.Event.CLICK, this, this.onClickReset);  let partPath = "res/aixin_bao.part"; Laya.loader.l...

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

440. 释放资源报错 [ 76%]

...ootBone){             this._cacheRootBone.transform.off(/*laya.events.Event.TRANSFORM_CHANGED*/"transformchanged",this,this._boundChange); 这里的this._cacheRootBone非空,但是上面transform是空的   这个精灵是 SkinnedMeshRenderer绑定的RootBone的对象。   下面是...

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