Beispiel #1
0
 public RunAwayFromTransform(IBehaviourWithRange behaviour, NavMeshAgent agent,
                             ProximityDetector proximityDetector, EnemyBehaviour.MoveState moveState)
     : base((EnemyBehaviour)behaviour, agent, moveState)
 {
     this.proximityDetector = proximityDetector;
     this.rangeBehaviour    = behaviour;
 }
Beispiel #2
0
 public MaintainRangeFromTransform(IBehaviourWithRange behaviour, Transform player, ProximityDetector playerProximity)
 {
     this.behaviour = (EnemyBehaviour)behaviour;
     this.player    = player;
     this.minRange  = behaviour.GetMinRange();
     this.maxRange  = behaviour.GetMaxRange();
     playerProximity.DetectionRadius = minRange;
 }