public PhysicsComponent(IEnumerable <Rigidbody> rigidbodies, AnimationComponent animationComponent,
                         NavigationComponent navigationComponent)
 {
     _rigidbodies         = rigidbodies;
     _animationComponent  = animationComponent;
     _navigationComponent = navigationComponent;
 }
Beispiel #2
0
 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);
 }