public void SetUp(IEnumerable <DestinationPoint> destinations, HealthController healthController, WinLoseController winLoseController, IInstantiator instantiator) { AnimationComponent = new AnimationComponent(_animator); NavigationComponent = new NavigationComponent(_navMeshAgent, destinations, transform, _syncTransform, healthController, winLoseController, _hitEffect, instantiator); PhysicsComponent = new PhysicsComponent(gameObject.GetComponentsInChildren <Rigidbody>(), AnimationComponent, NavigationComponent); StunComponent = new StunComponent(PhysicsComponent, _onStun); NavigationComponent.Init(StunComponent); }
public void Init(StunComponent stunComponent) { _stunComponent = stunComponent; }
private void Update() { StunComponent.Tick(); NavigationComponent.Tick(); }