mirror of
https://github.com/doublespeakgames/adarkroom.git
synced 2026-06-11 06:57:13 +08:00
Timing for winning and efficiency
This commit is contained in:
+7
-3
@@ -512,7 +512,11 @@ var Events = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
winFight: function() {
|
winFight: function() {
|
||||||
if(!Events.lost) {
|
Engine.setTimeout(function() {
|
||||||
|
// Check after animation time, to see if the player has died before winning
|
||||||
|
if(Events.lost) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
Events.endFight();
|
Events.endFight();
|
||||||
$('#enemy').animate({opacity: 0}, 300, 'linear', function() {
|
$('#enemy').animate({opacity: 0}, 300, 'linear', function() {
|
||||||
Engine.setTimeout(function() {
|
Engine.setTimeout(function() {
|
||||||
@@ -551,14 +555,14 @@ var Events = {
|
|||||||
Events.createUseMedsButton(0).appendTo(healBtns);
|
Events.createUseMedsButton(0).appendTo(healBtns);
|
||||||
}
|
}
|
||||||
$('<div>').addClass('clear').appendTo(healBtns);
|
$('<div>').addClass('clear').appendTo(healBtns);
|
||||||
Events.setHeal();
|
Events.setHeal(healBtns);
|
||||||
}
|
}
|
||||||
$('<div>').addClass('clear').appendTo(exitBtns);
|
$('<div>').addClass('clear').appendTo(exitBtns);
|
||||||
|
|
||||||
Events.allowLeave(takeETbtn, leaveBtn);
|
Events.allowLeave(takeETbtn, leaveBtn);
|
||||||
}, 1000, true);
|
}, 1000, true);
|
||||||
});
|
});
|
||||||
}
|
}, Events._FIGHT_SPEED);
|
||||||
},
|
},
|
||||||
|
|
||||||
loseFight: function(){
|
loseFight: function(){
|
||||||
|
|||||||
Reference in New Issue
Block a user