private void Awake() { base.Self = GetComponent <Enemy>(); base.PathFinder = GetComponent <RootPathFinding>(); base.Animator = GetComponent <Animator>(); this.Movement = GetComponent <MovementNavmesh>(); this.ArrowPool = Pool.GetPool(trajectile); this.theDetection = Self.Detection as ElementaryRangedDetection; }
public override void Behavior() { if (theDetection == null) { theDetection = Self.Detection as ElementaryRangedDetection; } theDetection.DetectEnemy(); Move(); Turn(); Attack(); }