大约有 488 项符合查询结果, 库内数据总量为 30,900 项。 (搜索耗时: 0.0037 秒)
...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
...ya.MovieClip; export class SpriteSheetTest extends Sprite{ constructor() { super(); let mc:MovieClip=new MovieClip(); } } 就这点代码,运行后就报错 2017-07-19 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 该问题目前已经被锁定, 无法添加新回复 发...
来源: Laya_社区 发布时间: 20170718
...Laya.Script3D { //用于表现的方法 public showMsgFunc; constructor(){ super(); } //对应unity添加的AnimationEvent的动画事件函数,名字是可以对应上的 ShowMsg(){ console.log("ShowMsg"); this.showMsgFunc && this.showMsgFunc(); } } ``` 在加载好场景之后,我们将我们...
来源: Laya2.0_文档 发布时间: 20210715
...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
...如下 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
... 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
...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
...ipt { private skin: string = "atlas/comp/colorPicker.png"; constructor() { super(); } // 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { Laya.loader.load(this.skin).then( ()=>{ this.onColorPickerSkinLoaded(); } ); } private onC...
来源: Laya3.0_文档 发布时间: 20240910
...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
...的方式进行管理对象池: 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_文档 发布时间: 20240910