Package com.prineside.tdi2.actions


package com.prineside.tdi2.actions
Variants of Action Actions are small records of player's activity he performs during the run, for example selling a tower or calling a wave. Player does not interact with the game's state directly, instead each time he clicks some button, the game queues different actions for the next simulated frame to be picked up by different systems. Actions are stored per-frame during the run (for example, "player has called a wave on frame 31") and replays consist mostly of them. When a replay is started, the game will prepare exactly the same level and will simulate it, feeding the same actions on the same frames, which guarantees exactly the same outcome of the run on any frame. For example, an action can be queued for some specific frame with StateSystem.pushAction(com.prineside.tdi2.Action, int). Later a system can check if some action has been performed on the current frame by calling StateSystem.getCurrentUpdateActions().