| @@ -36,9 +36,25 @@ stories.push({ | |||||
| }, | }, | ||||
| "enter": (room, state) => { | "enter": (room, state) => { | ||||
| print(["*sound of you entering your house*"]); | print(["*sound of you entering your house*"]); | ||||
| startTimer({ | |||||
| id: "room-counter", | |||||
| func: state => { | |||||
| state.world["Home"].data.stats.number.value += 1; | |||||
| return true; | |||||
| }, | |||||
| delay: 1000, | |||||
| loop: true, | |||||
| classes: [ | |||||
| ], | |||||
| room: "Home", | |||||
| }, state); | |||||
| }, | }, | ||||
| "exit": (room, state) => { | "exit": (room, state) => { | ||||
| print(["You are exiting your house"]); | print(["You are exiting your house"]); | ||||
| stopRoomTimers("Home", state); | |||||
| }, | }, | ||||
| "actions": [ | "actions": [ | ||||
| { | { | ||||
| @@ -95,6 +111,7 @@ stories.push({ | |||||
| "hooks": [ | "hooks": [ | ||||
| (room, state) => { | (room, state) => { | ||||
| print(["This is a test of the hooks"]); | print(["This is a test of the hooks"]); | ||||
| return true; | return true; | ||||
| } | } | ||||
| ], | ], | ||||