Contents |
Take a list of instructions for the manager to issue at the correct times.
Start a timer and loop over Instructions - calling Instruction.perform() at the correct time in execution. Call this.repaint(time) every so much time. Time integers are determined here by the timer - they are to be represented in milliseconds since render was first called.
Go through the list of all sprites currently on the screen and call repaint with the time and this.buffer - sprites that are at the end of their time on screen should be removed from the list in this method as well.
Subclasses should be created that take the string inputs from different file formats and construct the Instruction[] array to pass to super.
Create an instruction that is associated with the given sprite and holds the data given in subsequent parameters.
Call the method(s) on the sprite that make sense given the kind of instruction.
Subclasses should be created for individual instructions such as move and doAction.
Calculate where the sprite should be and render it there in buffer
Subclasses should be created that take string inputs from different file formats and populate the sprite data.