jonoxia / rpgbase

Generic Node.js/HTML5 role-playing game client/server
8 stars 6 forks source link

Needed: Battle animation callbacks #19

Closed jonoxia closed 11 years ago

jonoxia commented 11 years ago
jonoxia commented 11 years ago

For the timing issue, maybe a BatCmd execute method should return an animation, and the battleSystem runs the animation and pauses the turn sequence until the animation's done?

BattleSystem's animator currently does battleSystem.draw() at the end of each frame because the logic is copied from mapScreen. But if we're going to be drawing SFX to the screen (fireballs, sword slashes, etc), those need to be drawn after battleSystem.draw() draws the background.

Each frame of animation, the following needs to happen in this order: