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

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

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

...erObject);         this._colliderShape.destroy();         _super.prototype._onDestroy.call(this);         this._nativeColliderObject=null;         this._colliderShape=null;         this._simulation=null;         (this.owner).transform.off(/*laya.events...

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

252. MovieClip is not a constructor [ 53%]

...ya.MovieClip; export class SpriteSheetTest extends Sprite{ constructor() { super(); let mc:MovieClip=new MovieClip(); } } 就这点代码,运行后就报错 2017-07-19 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 该问题目前已经被锁定, 无法添加新回复 发...

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

253. 取色器组件 · LayaAir3.0文档 · LAYABOX [ 53%]

...ipt { private skin: string = "atlas/comp/colorPicker.png"; constructor() { super(); } // 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { Laya.loader.load(this.skin).then( ()=>{ this.onColorPickerSkinLoaded(); } ); } private onC...

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

254. 在Unity中设置动画事件(TypeScript-3D基础(TS)-LayaAir3D之Animator动画) [ 53%]

...Laya.Script3D { //用于表现的方法 public showMsgFunc; constructor(){ super(); } //对应unity添加的AnimationEvent的动画事件函数,名字是可以对应上的 ShowMsg(){ console.log("ShowMsg"); this.showMsgFunc && this.showMsgFunc(); } } ``` 在加载好场景之后,我们将我们...

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

255. 使用了destroy()之后,还需要手动移除侦听事件和引用吗? [ 53%]

...mage。我需要手动将img属性置null吗? 比如:public destroy(){ super.destroy(); this.img = null; } 这个有必要吗? 最后,有没有关于优化的比较系统的文档,https://ldc.layabox.com/doc/?nav=zh-js-3-2-1和https://ldc.layabox.com/doc/?nav=zh-js-3-2-1这两个文档空...

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

256. 多重遮罩显示异常 [ 52%]

...如下 export default class ClipView extends Laya.Sprite { constructor() { super(); this.init(); } init() { let bg = new Laya.Sprite(); bg.graphics.drawRect(0, 0, 500, 500, '#aaa'); this.addChild(bg); this.panel = new Laya.Panel(); this.panel.width = 500; this.panel.height = 500; this.panel.vScrollB...

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

257. popup设置了关闭效果后,窗口关闭但遮罩层没有关掉,请问如何处理 [ 52%]

... export default class ShopDialog extends ui.ShopDialogUI { constructor() { super(); this.popupEffect = Laya.Handler.create(this, this.showEffect); this.closeEffect = Laya.Handler.create(this, this.hideEffect); this.btnClose.on(Laya.Event.CLICK, this, this.closeDialog); } //关闭 closeDialog(): void...

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

258. [LayaAir 2.0] 如何用代码为Spirte添加2d物理特性 [ 52%]

...sionBoll extends Laya.Sprite { private _boll1:Laya.Sprite; constructor() { super(); //物理模块 this._boll1 = new Laya.Sprite(); this.addChild(this._boll1); this._boll1.x = 20; this._boll1.loadImage('comp/btn_close.png'); let box:laya.physics.BoxCollider = this._boll1.addComponent(laya.physics.Bo...

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

259. 对象池 · LayaAir3.0文档 · LAYABOX [ 52%]

...的方式进行管理对象池: export class EffectA { constructor() { super(); } static create(): EffectA { Pool.getItemByClass(EffectA); } recover(): void { Pool.recoverByClass(this); } } export class EffectB { constructor() { super(); } static create(): EffectB { Pool.getItemByClass(EffectB); }...

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

260. 2.0版本,Particle2D is not a constructor [ 52%]

...nstructor export default class RunMain extends Laya.Sprite{ constructor(){ super(); Laya.loader.load([{url:"res/213.part",type:Laya.Loader.JSON}],Laya.Handler.create(this,this.onAssetsLoaded)); } onAssetsLoaded(){ let pg = Laya.loader.getRes("res/213.part"); let pd = new Laya.Particle2D(pg); } }213....

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