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

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

181. 使用3DUI · LayaAir3.0文档 · LAYABOX [ 61%]

...nerated"; import { Main } from "./Main"; @regClass() export class BloodBar extends BloodBarBase { onAwake(): void { this.bar.value = 1; this.value.visible = false; Laya.stage.on( Laya.Event.CLICK, this, this.onHurt ); } onHurt(): void { this.bar.value = this.bar.value - 0.1; this.value.y = 35; this....

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

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

183. 切换后台时,引擎如何判断是否停止定时器? [ 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

184. 使用 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

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

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

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

186. 播放视频只有声音没有图像 [ 61%]

...有 let SoundManager = Laya.SoundManager; export default class LoginGame extends Laya.Scene { constructor() { super(); LoginGame.instance = this; Laya.MouseManager.multiTouchEnabled = false; this.loadScene("LoginGame.scene"); } onEnable() { SoundManager.playMusic("audio/梅林茂 - 静かな古都.m...

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

187. 创建laya的视图销毁destroy()清除不了 [ 61%]

...不了 创建laya的视图销毁destroy()清除不了。  class Mail2View extends laya.display.Sprite { private display:ui.mail.mail2UI; constructor(){ super(); this.display = new ui.mail.mail2UI(); this.addChild(this.display); } public destroy():void { this.display.destroy(); this.display.removeSe...

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

188. Laya.Script的派生类的_update函数不工作? [ 61%]

Laya.Script的派生类的_update函数不工作? 我从Laya.Script类extends了一个自己的class,贴在一个物体上,运行的时候脚本的_start函数中的log正常打印出来了,但是_update函数中的log没有打印 _update(state:Laya.RenderState) { console.log("state:", st...

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

189. 预设/场景的导出(JavaScript-3D基础(JS)-LayaAir3D之3D场景可视化编辑) [ 60%]

...我们直接修改GameUI类)。 ```javascript export default class GameUI extends Laya.Scene { constructor(){ super(); //加载场景文件 this.loadScene("test/TestScene.scene"); //加载场景 Laya.Scene3D.load('LayaScene_test/Conventional/test.ls',Laya.Handler.create(this,this.onComplete)) } /** ...

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

190. 在UI类里调用启动类的静态函数失败了 [ 60%]

...?   /**Created by the LayaAirIDE*/ module view { export class GameInfo extends ui.GameInfoUI { constructor() { super(); this.kaishi_btn.on(Laya.Event.MOUSE_DOWN, this, this.onStart); // Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.birdFly);//可以绑定两个函数 Laya.stage.on(Laya.Event.KE...

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