Public Member Functions | |
| Gobject () | |
| Gobject (Gobject g) | |
| Copy Constructor. | |
| ArrayList | execute (Map collisions, Map k) |
| Runs every behavior stored in this Gobject. | |
| void | paint (Canvas jp, Graphics g) |
| This function takes the Gobject's image and location information and uses it to draw the Gobject to the screen. | |
| ArrayList | getBehaviors () |
| Object | getVariable (String s) |
| Map | getData () |
| void | setBehavior (Behavior b) |
| void | setData (String s, Object o) |
Private Attributes | |
| ArrayList | behaviorList |
| Map | data |
Gobject is not subclassed, and Gobjects differ only by their data and behaviors. All data is stored in the Gobject using a Map.
|
|
|
|
|
Copy Constructor.
|
|
||||||||||||
|
Runs every behavior stored in this Gobject.
|
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
This function takes the Gobject's image and location information and uses it to draw the Gobject to the screen. The painting occurs on a canvas which is not the current canvas, enabling double buffering.
|
|
|
|
|
||||||||||||
|
|
|
|
|
|
|
|
1.4.1