Closed stanbsky closed 2 years ago
Consists of three types of lists: list of renderables (everything that needs update
and draw
), lists of objects that may need function calls (get position, health, etc), and lists of spawns (college, random)
isAlive
- if false, moved into list of things to disposegetRandomPirate
, spawnBullet
, collegesAlive
, etcEverything should be static if at all possible
Implemented in f950990b30740a8bd6c2e383a99260a6c06cb379
Further to the above, other changes were made:
cleanup()
and dispose()
cleanup()
(bad naming) returns true
if the resource is ready to get removed from the gamedispose()
is called by the EntityManager
before the resources are removedEntity end-of-life cycle should look like this:
Situation
We have two separate problems:
Opportunity
RenderingManager seems to be doing a bang up job of rendering and updating stuff, and it's static at that! Meaning we could easily bang out a static method letting you grab a player's position whenever needed. Also through the
IRenderable
interface, we can register anything that needsdraw
andupdate
methods callling in one place.Mission
Pull out as much stuff as possible out of the current ListOf... aka Manager classes. Where they have further functionality, we could maybe implement it as manager components, or via static access to the RenderingManager, or subclass the RenderingManager if not possible otherwise.