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

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

951. LayaAir引擎AS3与Flash原生AS3的开发差异(ActionScript-简介篇(AS3)-LayaAir引擎简介) [ 73%]

...raphics.drawCircle(0,0,50,'#FF0000'); sp.mask=mask; Laya.timer.frameLoop(1,this,function():void { mask.x++; sp.repaint(); }); ``` ## 三、Sprite自身绘制的graphics矢量图形注册事件点击区域差异; ​ 在原生Flash AS3中,Sprite精灵创建完成后会自动计算宽高。但是在...

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

952. QQ小游戏demo跑不起来 MiniFileMgr.fs.readFile无回调 [ 73%]

...ain.ts的 Laya.ResourceVersion.enable("version.json", Laya.Handler.create(this, this.onVersionLoaded), Laya.ResourceVersion.FILENAME_VERSION); 该行能成功运行,执行了this.onVersionLoaded回调; 2、然后该行Laya.AtlasInfoManager.enable("fileconfig.json", Laya.Handler.create(this, thi...

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

953. LayaAir 2.0.1 切换场景报异常 Cannot read property ‘_physicsUpdateList’ [ 73%]

...l 求指导~~       __proto._onDestroy=function(){          (this._inPhysicUpdateListIndex!==-1)&& (this._simulation._physicsUpdateList.remove(this));          var physics3D=Laya3D._physics3D;         delete PhysicsComponent._physicObjectsMap[this.id];     ...

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

954. flag的问题 [ 73%]

...间间隔播放颜色切换的矩形         Laya.timer.loop(500, this, createRect);               })();       function createRect()     {         var c = new Sprite();          var color = (flag = !flag)?"#A52A2A":"#FFA500"         ...

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

955. 屏幕适配-缩放-Extract Fit [ 73%]

...ya.stage.scaleMode = Stage.SCALE_EXACTFIT; Laya.stage.bgColor = "#232628"; this.createCantralRect(); } createCantralRect() { const Sprite = Laya.Sprite; this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } update...

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

956. 屏幕适配-缩放-Show All [ 73%]

...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createCantralRect(); } createCantralRect() { const Sprite = Laya.Sprite; this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } update...

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

957. graphics drawPath drawLine 鼠标 画笔 画线 锯齿 [ 73%]

...鼠标 画笔 画线 锯齿 mouseMove(e:Laya.Event){ /**/ var p:Laya.Point=this.startPoint; this.cls.graphics.drawPath(0,0,[ ["moveTo", p.x,p.y], ["lineTo", e.stageX,e.stageY] ],null,{strokeStyle:"#ff0000",lineWidth:15,lineJoin:"round",lineCap:"round"}); //*/ //this.cls.graphics.drawLine(this.startP...

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

958. Animation 使用疑问 [ 73%]

...疑问 清理问题 内存没有发生变化 private onBtnClick(): void { this.body = new Laya.Animation(); this.body.y = -100; this.body.interval = 50; this.addChild(this.body); this.body.play(0, true, "hero_fly"); } private body: Laya.Animation; private onBtn2Click(): void { this.body.destroyChild...

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

959. laya图片路径问题 [ 73%]

...ublic/test/img/food/f9.png", ];    Laya.loader.load(urls, Handler.create(this, onAssetLoaded), Handler.create(this, onLoading, null, false), Loader.TEXT);   这个样能加载。 但是 var roleAni = new Laya.Animation();  roleAni.loadImages();  roleAni.play();  Laya.stage.addChild(roleAni); ...

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

960. 重复背景,全方向地图拖动Demo [ 73%]

... 1800 class WorldPage extends ui.WorldPageUI{ constructor (x,y) { super() this.maxX = 149850 this.maxY = 97500 this.offsetX = x * 150 this.offsetY = y * 150 this.downMouseX = 0 this.downMouseY = 0 Laya.loader.load(['bg/world_bg.jpg']) Laya.stage.on(Laya.Event.MOUSE_DOWN,this,this.mouseDown) Laya.sta...

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