大约有 458 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0040 秒)
...例化 laya.ani.bone.Skeleton 对象报错 export default class showSpine extends Laya.Script{ constructor() { super(); //创建一个Skeleton对象 //Laya let skeleton: laya.ani.bone.Skeleton = new laya.ani.bone.Skeleton(); } } 实例化报错 为啥 2018-09-28 添加评论 免费帖 --> 分享 微...
来源: Laya_社区 发布时间: 20180928
...为getter和setter,以写子类继承为例: public class CustomBitmap extends Sprite { public function CustomBitmap() { } public get luminance():Number { //返回亮度参数值 //... } //亮度,其他一样 public set luminance(value:Number):void { //你自己的处理代码 //... } } var disp...
来源: Laya_社区 发布时间: 20180511
...ntroller.js import wxHelper from 'wxhelper' export default class welcome extends Laya.Script { constructor() { super() } onEnable() { wxHelper.onShow(this.resumeGame) wxHelper.onHide(this.pauseGame) } resumeGame () { console.log('resumeGame') } pauseGame () { console.log('pauseGame') } onDestroy (...
来源: Laya_社区 发布时间: 20181101
...et.Loader; import HTMLIframeElement = Laya.HTMLIframeElement; class TestUI extends ui.htmlUI { constructor() { super(); var iHtml: HTMLIframeElement = new HTMLIframeElement(); Laya.stage.addChild(iHtml); iHtml.href = "https://www.baidu.com/"; } } // 程序入口 Laya.init(600, 400); Laya.loader.load...
来源: Laya_社区 发布时间: 20171011
...都添加了脚本。 > **脚本类**: ```typescript class MouseScript extends Script3D{ private var meshsp:MeshSprite3D; public function MouseScript() {} /** * 覆写3D对象组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ override public func...
来源: Laya2.0_文档 发布时间: 20210715
...错"Illegal constructor",请问这个该怎么处理? class ChatLineView extends Laya.Box{ textfield : any = null; constructor(){ super(); // this.initLineView(); } public initLineView (data) : void { this.pos(0,0); console.log(this.textfield); if (this.textfield == null) { var stextfield = new HT...
来源: Laya_社区 发布时间: 20180709
...当前的选项,说明继承没有问题,但是无法更改 class Tab extends TabUI{ constructor() { super() this.zOrder = 1 console.log(this._tab._selectedIndex) //返回1,正常 this._tab._selectedIndex = 0 } } xdkaka • 2017-12-14 17:40 发布肯定是已经发布了的。。。。看了...
来源: Laya_社区 发布时间: 20171214
...否停止定时器? 在pc上时,做个简单的测试, class TestUI extends ui.test.TestPageUI { constructor() { super(); this.stage.on(Laya.Event.FOCUS, this, this.onFocus); this.stage.on(Laya.Event.BLUR, this, this.onBlur); ...
来源: Laya_社区 发布时间: 20180724
...面图片的错误 GameStart 类如下: export default class GameStart extends ui.GameStartUI { constructor() { super(); this.btnStart.on(Laya.Event.CLICK, this, this.startGame); } startGame(): void { //Laya.Scene.open("Ga...
来源: Laya_社区 发布时间: 20190510
...无法触发onTriggerEnter, export default class BulletControlTrigger extends Laya.Script3D { constructor(){ super(); } /** * 开始触发时执行 * 此方法为虚方法,使用时重写覆盖即可 */ onTriggerEnter(other){ console.log("onTriggerEnter"); }; onTriggerStay(other){ console...
来源: Laya_社区 发布时间: 20191215