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

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

181. 实例化 laya.ani.bone.Skeleton 对象报错 [ 61%]

...例化 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

182. Tween.to时添加滤镜 [ 61%]

...为getter和setter,以写子类继承为例: public class CustomBitmap extends Sprite { public function CustomBitmap() { } public get luminance():Number { //返回亮度参数值 //... } //亮度,其他一样 public set luminance(value:Number):void { //你自己的处理代码 //... } } var disp...

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

183. 微信小游戏,实现监听前后台切换 [ 61%]

...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

184. HTMLIframeElement加载html网页的问题 [ 61%]

...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

185. 鼠标脚本(ActionScript-3D基础(AS3)-LayaAir3D之鼠标交互) [ 61%]

...都添加了脚本。 > **脚本类**: ```typescript class MouseScript extends Script3D{ private var meshsp:MeshSprite3D; public function MouseScript() {} /** * 覆写3D对象组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ override public func...

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

186. 聊天消息对话框中new一个HTMLDivElement 报错"Illegal constructor",请问这个该怎么处理? [ 61%]

...错"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

187. Tab组件如何通过js控制选中 [ 61%]

...当前的选项,说明继承没有问题,但是无法更改 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

188. 切换后台时,引擎如何判断是否停止定时器? [ 61%]

...否停止定时器? 在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

189. 使用 addChild 加载界面后,绑定事件报错 [ 61%]

...面图片的错误 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

190. 两个移动的简单物体 onTriggerEnter 无法触发 (有悬赏) [ 61%]

...无法触发onTriggerEnter,   export default class BulletControlTrigger extends Laya.Script3D { constructor(){ super(); }  /** * 开始触发时执行 * 此方法为虚方法,使用时重写覆盖即可 */ onTriggerEnter(other){ console.log("onTriggerEnter"); };  onTriggerStay(other){ console...

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