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

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

1. Uncaught 无法实例class PhysicsCollider extends PhysicsTriggerComponent [ 100%]

...LLFILTER) {         super(collisionGroup, canCollideWith);         this._enableProcessCollisions = false;     }     _addToSimulation() {         this._simulation._addPhysicsCollider(this, this._collisionGroup, this._canCollideWith);     }     _removeFromSimulation() {        ...

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

2. Sprite-切换纹理 [ 94%]

...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.flag = true; Laya.loader.load([monkey1Str, monkey2Str], Laya.Handler.create(this, this.onAssetsLoaded)); } onAssetsLoaded() { monkey1Res = Laya.loader.getRes(monkey1Str), monkey2Res = Laya.loader.getRes(monkey2Str); this...

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

3. Sprite-切换纹理 [ 94%]

...bgColor = "#232628"; Laya.loader.load([texture1, texture2], Handler.create(this, onAssetsLoaded)); })(); function onAssetsLoaded() { ape = new Sprite(); Laya.stage.addChild(ape); ape.pivot(55, 72); ape.pos(Laya.stage.width / 2, Laya.stage.height / 2); // 显示默认纹理 switchTexture(); ape.on("c...

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

4. 新手请问下如何开启Laya3D的physics [ 91%]

...s3D; var btColObj=new physics3D.btCollisionObject(); btColObj.setUserIndex(this.id); btColObj.forceActivationState(5); var flags=btColObj.getCollisionFlags(); if ((this.owner).isStatic){ if ((flags & 2)> 0) flags=flags ^ 2; flags=flags | 1; }else { if ((flags & 1)> 0) flags=flags ^ 1; ...

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

5. UI-RefreshList [ 89%]

...ya.Tween; TextArea = Laya.TextArea; class UI_RefreshList { constructor() { this.baseBox = null; this.refreshLoading = null; this.loadingAni = null; this.loadingLabel = null; this.refreshList = null; /** 消息生成的当前最大id值 */ this.msgIdNow=1; /** 滚动条效果是否停止 */ this.scro...

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

6. flag的问题 [ 88%]

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

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

7. 显示与切换图片(TypeScript-LayaAir基础篇(TS)-位图) [ 86%]

..._CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#ffffff"; this.showApe(); } private showApe(): void { // 方法1:使用loadImage var ape: Sprite = new Sprite(); ape.pos(100,50); Laya.stage.addChild(ape); ape.loadImage("../../res/apes/monkey3.png"); } } } new laya.Sprite_DisplayIma...

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

8. 2.0下资源加载和销毁内存问题 [ 85%]

...M,以此类推。 而 代码中的区别仅仅是  Laya.loader.clearRes(this.szurl,true); //1.0 Laya.loader.clearRes(this.szurl);//2.0   现在附完整代码,劳驾帮看下是不是我2.0版本的有什么问题。最后也附上有代码的截图,laya社区帖子编辑模式有点太低...

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

9. 切换位图,点击图片距离容器的区域也会触发点击事件 [ 84%]

...距离容器的区域也会触发点击事件 function TransitionImg() { this.flag = false; //判断条件 this.img1 = "../laya/assets/comp/haoyoubang-liang.png"; //地址 this.img2 = "../laya/assets/comp/haoyuobang-hui.png"; var img = new Laya.Sprite(); //实例 img.width = 300; //宽高 img.height...

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

10. 新人求教!!! [ 84%]

...通过回调方法绘制图片并添加到舞台      Laya.loader.load([this.monkey1,this.monkey2],Laya.Handler.create(this,this.graphicsImg)); } private graphicsImg():void{    //创建一个实例    this.img = new Laya.Sprite();    //添加到舞台    Laya.stage.addChild(this.img);   ...

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