大约有 185 项符合查询结果, 库内数据总量为 31,671 项。 (搜索耗时: 0.0047 秒)
...ene.root.addChild(t); } } //激活启动类 new Main(); class tt extends Laya.Node{ constructor(){ super(); } public onAwake():void{ console.log(1111); } } 2.继承Sprite 执行后会有onAwake let t = new ...
来源: Laya_社区 发布时间: 20190701
Laya2.0 extends Array 有问题。 新建一个class A 继承array, 写入自己的方法,new A , 无法调用A内自己写入的方法 附件 : --> testarray.zip 2019-03-01 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1...
来源: Laya_社区 发布时间: 20190301
...Laya.ClassUtils.regClass; export module ui.test { export class TestSceneUI extends Laya.Scene { public scoreLbl:Laya.Label; public tipLbll:Laya.Label; constructor(){ super()} createChildren():void { super.createChildren(); this.loadScene("test/TestScene"); } } REG("ui...
来源: Laya_社区 发布时间: 20190402
...oyedScenes属性查看还未被销毁的场景列表 */ export class Scene extends Sprite { /**创建后,还未被销毁的场景列表,方便查看还未被销毁的场景列表,方便内存管理,本属性只读,请不要直接修改*/ static readonly unDestroyedScenes: Set<Scene> ...
来源: Laya3.0_文档 发布时间: 20251010
...继承Laya.Scene BaseScene.tsexport namespace base{ export class BaseScene extends Laya.Scene{ constructor(){ super(); console.log('BaseScene:我是基类BaseScene,我的子类是导出类,我的父类是场景类'); } } } 导出UI 导出后layaMaxUI.ts的内容如下/**This class is automatically...
来源: Laya_社区 发布时间: 20200827
... 下面是一个推荐做法: //Script.ts @Laya.regClass() class Script extends Laya.Script { wantToUseNode() { EditorEnv.scene.runScript("TestSceneScript.visitNode"); } } //TestSceneScript.ts import fs from "fs"; //注意是IEditorEnv.regClass,不是Laya.regClass!! @IEditorEnv.regClass() class ...
来源: Laya3.0_文档 发布时间: 20251010
...} from "./RuntimeScript.generated"; @regClass() export class RuntimeScript extends RuntimeScriptBase { onAwake(): void { // Button添加鼠标事件,让Image不显示 this.Button.on( Laya.Event.MOUSE_DOWN, this, ()=>{ this.Image.visible = false; }); } } 其次,可以在Scene2D节点下添加...
来源: Laya3.0_文档 发布时间: 20251010
...age1Runtime.jsimport LoadPage from './loadPage' export default class page1 extends Laya.Scene { constructor() { super() } onEnable() { // 预加载loadPage let loadPage = new LoadPage() loadPage.preload() this.getChildByName('text').on(Laya.Event.CLICK, this, function () { // 切换打开场景方...
来源: Laya_社区 发布时间: 20181124
...测的问题 import BoxMove from "./BoxMove"; export default class GameUI extends Laya.Scene { constructor() { super(); //加载场景文件 this.loadScene("test/TestScene.scene"); //添加3D场景 var scene = Laya.stage.addChild(new Laya.Scene3D()); //添加照相机 var camera = (scene.addChild(ne...
来源: Laya_社区 发布时间: 20190314
....Dialog; import Scene=Laya.Scene; export module ui { export class AttackUI extends View { public btn_attack:Laya.Button; constructor(){ super()} createChildren():void { super.createChildren(); this.loadScene("Attack"); } } } 扩展UI代码: import { ui } from "../ui/layaMaxUI"; export default c...
来源: Laya_社区 发布时间: 20180926