Renderer/assets/Scenes/defaultLevel_2/scene.ts
2024-07-16 14:41:22 -04:00

40 lines
710 B
TypeScript

import { Scene } from "/Scripts/types/scene";
/**
* The main scene interface
*/
class TestScene1 extends Scene {
/**
* Called when the scene is created
* @param instanceId The scene instanceId
*/
onCreate = (instanceId: number) => {
console.log('Hello from the scene! My ID is ' + instanceId)
console.log(Object.keys(this))
}
/**
* All hooks for the scene
*/
hooks = [
/**
* Equip item hook
*/
{
signal: "equipItem",
callback: () => {
console.log("Item equipped")
}
},
]
}
/**
* The scene to export
*/
export default TestScene1