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

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

721. 加载-销毁Texture使用的图片资源 [ 64%]

....fromImage(PathBg); Laya.stage.addChild(this.spBg); // 创建动画 this.aniFly = new Animation(); this.aniFly.loadAtlas(PathFly); this.aniFly.play(); this.aniFly.pos(250, 100); Laya.stage.addChild(this.aniFly); // 创建按钮 this.btn = new Sprite().size(205, 55); this.btn.graphics.drawRect(0, 0, ...

来源: Laya2.0_示例 发布时间: 20251219

722. UI-Clip [ 63%]

...) / 2 + 110; Laya.stage.addChild(this.controller); } onClipSwitchState() { if (this.counter.isPlaying) { this.counter.stop(); currFrame = this.counter.index; this.controller.label = "播放"; } else { this.counter.play(); this.counter.index = currFrame; this.controller.label = "暂停"; } } } new UI...

来源: Laya2.0_示例 发布时间: 20251219

723. Node.ts 节点销毁之后为什么要注释掉 timer 的清理操作。 [ 63%]

...his._parent && this._parent.removeChild(this);  //销毁子节点 if (this._children) { if (destroyChild) this.destroyChildren(); else this.removeChildren(); } this.onDestroy();  this._children = null;  //移除所有事件监听 this.offAll();  //移除所有timer //this.timer.clearAll(...

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

724. 分享一个虚拟摇杆,比较粗糙,没做优化 [ 63%]

... }, 100) } //鼠标移动事件 ModeKey.prototype.moveFun = function (e) { if (!this.isDown) return; this.moveX = e.stageX; this.moveY = e.stageY; this.isMode = "run"; // 获取半径 var r = Math.sqrt(Math.pow((this.starX - this.moveX), 2) + Math.pow((this.starY - this.moveY), 2)); //当移动半...

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

725. Scene.load加载的时候无法正确的识别ResourceVersion [ 63%]

...L的: public static function addVersionPrefix(originURL:String):String { if (manifest && manifest[originURL]) { if (type == FILENAME_VERSION) return manifest[originURL]; return manifest[originURL] + "/" + originURL; } return originURL; } 在version.json,也就是manifest这个表中存...

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

726. LayaAir2.0(LayaBox)之小游戏开放域开发 [ 63%]

...%80%E6%94%BE%E5%9F%9F%E5%BC%80%E5%8F%91/image-20190307195813680.png?lastModify=1551962708 官方已经给我们搭建好了 基本的结构和框架,我们只需要修改部分细节即可 首先修改 Main下面的 方法 file:///blog/asroads.github.io/source/_posts/game/LayaAir2-0-LayaBox-%E4%B9...

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

727. ScrollRect设置会引起其他的UI资源无法正在显示 [ 63%]

...to Generated method stub var show:int = len -1; for(var i=0;i<len;i++){ if(arr[i]){ arr[i].x+= speed; if(arr[i].x>= show* PATH_LEN){ arr[i].x-=show* PATH_LEN; } } } } private function GetPathLen():Number { // TODO Auto Generated method stub var disX:Number = a.x-b.x; var disY:Number = a.y-b.y;...

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

728. wkwebview使用异常 [ 63%]

...        console.log("Brower Init CCCCCC");             if (_window) return _window;             console.log("Brower Init DDDDDDDD");             var win:* = _window = __JS__("window");             var doc:* = _document = win.document;     ...

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

729. LayaAir和原生DOM交互(JavaScript-2D进阶篇(JS)-扩展模块) [ 63%]

...er”的标签 var video = Laya.Browser.document.querySelector('#player'); if (Hls.isSupported()) { var hls = new Hls(); //加载m3u8源 hls.loadSource('http://content.jwplatform.com/manifests/vM7nH0Kl.m3u8'); hls.attachMedia(video); hls.on(Hls.Events.MANIFEST_PARSED, function () { video.play(); });...

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

730. 加载-销毁Texture使用的图片资源 [ 62%]

...mImage(this.PathBg); Laya.stage.addChild(this.spBg); //创建动画 this.aniFly = new Animation(); this.aniFly.loadAtlas(this.PathFly); this.aniFly.play(); this.aniFly.pos(250, 100); Laya.stage.addChild(this.aniFly); //创建按钮 this.btn = new Sprite().size(205, 55); this.btn.graphics.drawRect(0,...

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