Created
January 31, 2015 05:46
-
-
Save buty4649/05d62f927aafdfd931a1 to your computer and use it in GitHub Desktop.
Elevator Saga http://play.elevatorsaga.com/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
init: function(elevators, floors) { | |
var FLOOR_NUM = floors.floorNum; | |
var elevator1 = elevators[0]; // 初号機 | |
var elevator2 = elevators[1]; // 弐号機 | |
elevator1 | |
.on("idle", function() { | |
elevator1.goToFloor(0); | |
}); | |
.on("floor_button_pressed", function(floorNum) { | |
elevator1.goToFloor(floorNum); | |
}); | |
elevator2 | |
.on("idle", function() { | |
elevator2.goToFloor(0); | |
}); | |
.on("floor_button_pressed", function(floorNum) { | |
elevator2.goToFloor(floorNum); | |
}); | |
}, | |
update: function(dt, elevators, floors) { | |
// We normally don't need to do anything here | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#10
イイ乱数を引いてクリアしてしまったw
もう少しちゃんと調整しないと安定クリアできないなぁ。