stanbsky / How-Hard-Can-It-Be-Redux

DeltaDucks
http://stanbsky.com/How-Hard-Can-It-Be-Redux/
1 stars 0 forks source link

Factor out update and draw calls into RenderingManager #20

Closed stanbsky closed 2 years ago

stanbsky commented 2 years ago

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 needs draw and update 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.

stanbsky commented 2 years ago

Planning

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)

Everything should be static if at all possible

stanbsky commented 2 years ago

Implemented in f950990b30740a8bd6c2e383a99260a6c06cb379

Further to the above, other changes were made:

Entity end-of-life cycle should look like this: