Example #1
0
 public PlaneFly(PlaneBehaviour owner)
 {
     _owner        = owner;
     _stateMachine = owner.StateMachine;
 }
Example #2
0
 public void RestartPlane()
 {
     _prevPlane   = Ship.GetPrevPlane();
     IsHuntActive = false;
     _planeFly.StartFly();
 }
Example #3
0
 public static void SaveTarget(this PlaneBehaviour plane)
 {
     plane.PrevTargetPos   = plane.TargetPos;
     plane.PrevTargetSpeed = plane.TargetSpeed;
 }
Example #4
0
        public static bool CheckDistance(this PlaneBehaviour plane, Vector3 pos, float minDistPos)
        {
            var dist = (pos - plane.transform.position).magnitude;

            return(dist <= minDistPos);
        }
Example #5
0
 public static void ChangeTarget(this PlaneBehaviour plane, Vector3 newTargetPos, Vector2 newTargetSpeed)
 {
     plane.TargetPos   = newTargetPos;
     plane.TargetSpeed = newTargetSpeed;
 }