大约有 23 项符合查询结果, 库内数据总量为 30,897 项。 (搜索耗时: 0.0041 秒)
...import { RuntimeScriptBase } from "./RuntimeScript.generated"; @regClass() export class RuntimeScript extends RuntimeScriptBase { onAwake(): void { //60帧后,图片的透明度变为0.5 Laya.timer.frameOnce(60, this, () => { this.Image.alpha = 0.5; }) } } 1.2 定时重复执行 (基于帧率) ...
来源: Laya3.0_文档 发布时间: 20240910
...代码 //注意:IEditorEnv.regClass是必须的 @IEditorEnv.regClass() export class TestSceneScript { //注意:this是当前的IEditorEnv.IGameScene对象,如果不需要,也可以省略这个声明 static test(this: IEditorEnv.IGameScene, msg: string) { console.log(msg); //hello return "ok"...
来源: Laya3.0_文档 发布时间: 20250214
...import { RuntimeScriptBase } 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; }); } } 其次,可...
来源: Laya3.0_文档 发布时间: 20250217
...在运行 return false; } m_bInitialized = true; return true; } 然后在exports.cpp中,实现Steam初始化Initialize的接口封装, jsvm_value jsInitializeSteam(jsvm_env env, jsvm_callback_info info) { bool success = SteamManager::GetInstance()->Initialize(); printf("init steam!!!"); jsvm_...
来源: Laya3.0_文档 发布时间: 20250214
... lib/ | └── x64 | └── conch.lib ├──dllmain.cpp ├──exports.cpp 包含示例代码 ├──LayaExt.vcxproj └──framework.h 2.2 生成动态链接库 打开项目后,点击图2-3中的“生成解决方案”, (图2-3) 控制台的输出如下图2-4所示, (图...
来源: Laya3.0_文档 发布时间: 20250214
...Keyboard = Laya.Keyboard; const { regClass, property } = Laya; @regClass() export class Main extends MainBase { private _animator: Laya.Animator; private _isRun: boolean; onAwake() { console.log("Game start"); //加载指定的模型预制体,并添加到Scene3D场景内 Laya.loader.load("girl/gir...
来源: Laya3.0_文档 发布时间: 20240910
...import { RuntimeScriptBase } from "./RuntimeScript.generated"; @regClass() export class RuntimeScript extends RuntimeScriptBase { onAwake(): void { this.closeBtn.on(Laya.Event.CLICK, this, () => { this.close(); }); } } 1.3.3 关联场景 设置好弹窗之后,需要用代码将Dialog与所需...
来源: Laya3.0_文档 发布时间: 20240910
... } from "./BloodBar.generated"; 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.9; this...
来源: Laya3.0_文档 发布时间: 20250214
...r-typescript/dist/astar"; const { regClass, property } = Laya; @regClass() export class Main extends Laya.Script { private aStarInstance: AStarFinder; onStart() { console.log("Game start"); // 0表示通路,1表示障碍 let myMatrix = [ [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 1...
来源: Laya3.0_文档 发布时间: 20250214
...效的基类,包括创建,播放,暂停,销毁,清理对象池 export class Particle3D extends Sprite3D { private _isInited: boolean = false; private _filePath: string = null; private _particle: Laya.Sprite = null; private _shuriKenParticle3D: Array<ShuriKenParticle3D>= []; private _...
来源: Laya3.0_文档 发布时间: 20250214