Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- init: function(elevators, floors) {
- var elevator = elevators[0]; // Let's use the first elevator
- // Whenever the elevator is idle (has no more queued destinations) ...
- elevator.on("idle", function() {
- // let's go to all the floors (or did we forget one?)
- elevator.goToFloor(0);
- elevator.goToFloor(1);
- });
- myFunction(floors);
- },
- update: function(dt, elevators, floors) {
- // We normally don't need to do anything here
- },
- myFunction: function(floors) {
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement