소스 검색

Add simple example of room stats

tags/v0.1.2
Fen Dweller 6 년 전
부모
커밋
f26e585db9
1개의 변경된 파일17개의 추가작업 그리고 0개의 파일을 삭제
  1. +17
    -0
      stories/demo.js

+ 17
- 0
stories/demo.js 파일 보기

@@ -36,9 +36,25 @@ stories.push({
},
"enter": (room, state) => {
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) => {
print(["You are exiting your house"]);

stopRoomTimers("Home", state);
},
"actions": [
{
@@ -95,6 +111,7 @@ stories.push({
"hooks": [
(room, state) => {
print(["This is a test of the hooks"]);
return true;
}
],


불러오는 중...
취소
저장