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

大约有 2,033 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0079 秒)

361. 照着官方文档写的 Dialog 报错? [ 87%]

...r LoadResource = function () { LoadResource.prototype.init = function () { this._container = new Sprite(); Laya.stage.addChild(this._container); Laya.loader.load(["../bin/res/ui/progressBar.png", "../bin/res/ui/progressBar$bar.png"], Handler.create(this, this.onPreloaded)); }; LoadResource.prototype...

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

362. http无响应 [ 87%]

...ar LoginView = (function (_super) { function LoginView() { LoginView.super(this); //调用父类构造函数 this.dlg; } function connect() { var hr = new Laya.HttpRequest(); hr.once(Event.PROGRESS, this, onHttpRequestProgress); hr.once(Event.COMPLETE, this, onHttpRequestComplete); hr.once(Event.ERR...

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

363. 分享:销毁龙骨动画! [ 87%]

... = 250; addBtn.y = 50; Laya.stage.addChild(addBtn); DesBtn.on(Event.CLICK, this, onDesBtn); addBtn.on(Event.CLICK, this, onAddBtn); } private function onDesBtn():void { destroy(); } private function onAddBtn():void { startFun(); } public function startFun():void { mAniPath = "Dragon/Dragon.sk"; mFac...

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

364. Laya.Sprite loadImage 参数问题 [ 87%]

...L); //设置舞台背景色 Laya.stage.bgColor = "#ffffff"; //原始位图 this.createImg(100,50); //红色滤镜 this.creteRedFilter(); //灰色滤镜 this.createGrayFilter(); } /**创建位图**/ private createImg(w:number,h:number):Laya.Sprite{ var Img:Laya.Sprite = new Laya.Sprite(); //添加到...

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

365. 续飞机大战 [ 87%]

...und = (function (_super) { function BackGround() { BackGround.__super.call(this); //创建背景1 this.bg1 = new Laya.Sprite(); //加载并显示背景图 this.bg1.loadImage("war/background.png"); //把背景1放到容器内 this.addChild(this.bg1); //创建背景2 this.bg2 = new Laya.Sprite(); //...

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

366. 二进制图片(ActionScript-2D进阶篇(AS3)-游戏加载策略) [ 87%]

...", true); xhr.responseType = "arraybuffer"; xhr.onload = function () { if (this.status == 200) { var blob = new Blob([this.response], { type: "image/png" }); var img = document.createElement("img"); img.onload = function (e) { window.URL.revokeObjectURL(img.src); // 清除释放; }; img.src = window...

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

367. 批量销毁释放内存(JavaScript-3D基础(JS)-LayaAir3D的内存管理) [ 87%]

...roup=Resource&name=GarbageCollection)) ```typescript function(e:Event) { this._castType++; this._castType %= 2; switch (this._castType) { case 0: (e.target as Button).label = "释放显存"; this.loadScene(); break; case 1: (e.target as Button).label = "加载场景"; if (this._scene)//_scene不...

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

368. 求HTTP相关的文档或者例子谢谢了 [ 87%]

...on(e){}         __proto__.checkList=function(){             this.publicloader=new URLLoader();             this.publicloader.dataFormat=/*iflash.net.URLLoaderDataFormat.VARIABLES*/"variables";             this.publicloader.addEventListener(/*iflash.events.Event.COMPL...

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

369. [LayaAir2]字节小游戏物理的坐标不一样,碰撞盒会比laya的小,物理的位置也不一样 [ 87%]

...le(): void {         Laya.Physics.I.allowSleeping = false;         this.strWorldRoot= this.owner.scene.strWorldRoot;         Laya.Physics.I.worldRoot = this.strWorldRoot;     }     onUpdate(): void {         var playerPos=new Laya.Point(this.cameraPlayerOffset.x,this.cameraPlayer...

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

370. 字体切片组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 87%]

...和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.fontclp.pos(Laya.stage.width >> 1, Laya.stage.height >> 1); //位置 this.fontclp.size(500, 60); //大小 this.fontclp.pivot(this.fontclp.width/2, this.fontclp.height/2); //轴心点 this.fontclp.skin = "atlas/...

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