public RunAwayFromTransform(IBehaviourWithRange behaviour, NavMeshAgent agent, ProximityDetector proximityDetector, EnemyBehaviour.MoveState moveState) : base((EnemyBehaviour)behaviour, agent, moveState) { this.proximityDetector = proximityDetector; this.rangeBehaviour = behaviour; }
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; }