add onGameStart/onGameEnd/onLogin/onLogout events

This commit is contained in:
Eduardo Bart
2012-02-07 21:54:33 -02:00
parent ee1357a848
commit 09b3aa82df
16 changed files with 59 additions and 46 deletions

View File

@@ -53,7 +53,7 @@ function HealthBar.onManaChange(mana, maxMana)
manaBar:setPercent(percent)
end
connect(Game, { onLogin = HealthBar.create,
onLogout = HealthBar.destroy,
connect(Game, { onGameStart = HealthBar.create,
onGameEnd = HealthBar.destroy,
onHealthChange = HealthBar.onHealthChange,
onManaChange = HealthBar.onManaChange })