Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Entity
- {
- public List<IComponent> Components { get; set; }
- public Entity()
- {
- Components = new List<IComponent>();
- }
- public void Update(float elapsed)
- {
- foreach(var c in Components)
- {
- c.Update(elapsed);
- }
- }
- // BLA BLA BLA ADD COMPONENT GETCOMPONENT<T> REMOVECOMPONENT<T> BLA BLA BLA
- }
- public interface IComponent
- {
- void Update(float elapsed);
- // BLA BLA ETC BLA BLA
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement