void StartGame() { UnityTicker tickEngine = new UnityTicker(); //note this object can be safely garbage collected tickEngine.Add(container.Inject(new MonsterSpawner())); tickEngine.Add(container.Build <UnderAttackSystem>()); }
void StartGame() { //tickEngine could be added in the container as well //if needed to other classes! UnityTicker tickEngine = new UnityTicker(); tickEngine.Add(container.Build <MonsterSpawner>()); tickEngine.Add(container.Build <UnderAttackSystem>()); }