Stendhal code design: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
imported>Chad3f
imported>Chad3f
Line 22: Line 22:
// Done with entity - free up resources
// Done with entity - free up resources
entity.release();
entity.release();


'''Model/Controller'''

This contains all logical entity data, and is responsible for tracking all entity specific attribute changes in the RPObject that it wraps. Currently this also handles some of the UI controller functions.

The initialize() method is called with the RPObject that it will represent. This method is called after the constructor returns, but before anything else is [externally] called.
When the client no longer needs the entity, it should call release(), which should handling any cleanup that garbage collection only is insufficient.

The class gets notified of object changes via the RPObjectChangeListener interface that it implements. This will be called for all changes to it's object (and immediate slot objects).



'''View'''

The current view implementation is Entity2DView. This is responsible for rendering an entity in a 2D view.


=== Sound System ===
=== Sound System ===