js13kgames2017-muri/src/room_hydro.js
2017-09-13 22:59:35 +02:00

34 lines
1,004 B
JavaScript

(function() {
var hydro = {};
var background, door, keycard = null;
hydro.init = function() {
background = muri.bg('hydro');
door = muri.door('hydro', [38, 9]);
keycard = muri.get('entity')
.create('hydro.keycard', kontra.sprite({x: 55, y: 28, image: kontra.assets.images.keycard}))
.addCallback(function() {
muri.get('bubble')
.talk([
'Thats interesting ... ',
'The keycard from the captain.',
'That can be handy some day.'
]);
muri.room('lift').roomState.bridgeAccessible = true;
muri.get('entity').get('hydro.keycard').invisible = true;
});
};
hydro.onEnter = function() {
door.sprite.playAnimation('close');
};
hydro.render = function() {
background.render();
};
hydro.name = 'hydro';
muri.rooms.push(hydro);
}());