Go home

Contents

class Manager

new Manager(Instruction[], buffer)

Take a list of instructions for the manager to issue at the correct times.

void render()

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.

void repaint(int time)

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.

NOTES

Subclasses should be created that take the string inputs from different file formats and construct the Instruction[] array to pass to super.

class Instruction

new Instruction(Sprite, *params)

Create an instruction that is associated with the given sprite and holds the data given in subsequent parameters.

perform()

Call the method(s) on the sprite that make sense given the kind of instruction.

NOTES

Subclasses should be created for individual instructions such as move and doAction.

class Sprite

ABSTRACT : no constructor

void repaint(in time, buffer)

Calculate where the sprite should be and render it there in buffer

NOTES

Subclasses should be created that take string inputs from different file formats and populate the sprite data.

Retrieved from "http://wlsg.uwaterloo.ca/wiki/Xopulse/Classes"