public void InjectDependencies(Hero hero, IGameActionsExecutioner gameActionsExecutioner) { _hero = hero; _gameActionsExecutioner = gameActionsExecutioner; _moveSimulator.InjectDependencies(_hero); _attackSimulator.InjectDependencies(_hero); _abilitySimulator.InjectDependencies(_hero); _hero.OnStartSimulatingAction += StartSimulatingAction; }
public void InjectDependencies( int heroInstanceId, ITurnHandler turnHandler, IEventDispatcher eventDispatcher, IGameActionsExecutioner gameActionsExecutioner) { InitializeHeroEntity(heroInstanceId); _turnHandler = turnHandler; _heroSelector.InjectDependencies( _hero, turnHandler, _heroActionController, eventDispatcher ); _heroActionController.InjectDependencies(_hero, gameActionsExecutioner); _heroMovementController.InjectDependencies(_hero); _guiView.InjectDependencies(_hero, HeroHealth); _heroHealthController.InjectDependencies(_hero, HeroHealth); _heroAttackController.InjectDependencies(_hero); _heroAbilityController.InjectDependencies(_hero); }