Azokah / Heidur

A free, open source, multiplatform, casual RPG
0 stars 0 forks source link

Cleanup code from Unit.cs, rename it to GameObject.cs and Implement ECS #28

Closed Azokah closed 5 years ago

Azokah commented 5 years ago

Task type: Cleanup, Implementation

Important Notes

Once the MVP is finished this task will be of Next priority

Objective:

Implement the Entity Component System by removing logic from the Unit class. Example:

  1. Remove all the logic for Movement and colission checking from the Unit.cs class
  2. Create a IComponent.cs interface
  3. Create a PhysicsComponent.cs class that contains all the removed logic from the Unit.cs class
  4. Once this is done for every component of the class, Unit.cs must be renamed to GameObject.cs

The idea is that GameObjects must only be containers for components, and in their Update() method, they only need to update their list of components.