public void SwitchToFire() { GuardMode = false; HexFunnalCenterAnimator.SetBool("Guard", false); Shield.SetActive(false); CurrentState = HexFunnelState.Attacking; GetAttackPosition(); }
public void SwitchToGuard() { GuardMode = true; HexFunnalCenterAnimator.SetBool("Guard", true); Shield.SetActive(true); CurrentState = HexFunnelState.Guarding; GetGuardPosition(); }
public void Recall() { if (CurrentState != HexFunnelState.Resting) { ObjectToFollow = RestParent; FollowOffset = Vector3.zero; SwitchToRecall(); CurrentState = HexFunnelState.Recalling; ManagedBy.ActiveFunnels.Remove(this); ManagedBy.RestingFunnels.Add(this); } }
public void CheckDock() { if (Vector3.Distance(RestParent.position, transform.position) < 0.1f) { transform.parent = RestParent; transform.position = RestParent.position; transform.rotation = RestParent.rotation; CurrentState = HexFunnelState.Resting; /* * MySignal.enabled = false; * MySignalCollider.enabled = false; */ } }
public void Deploy(Transform Target) { if (CurrentState == HexFunnelState.Resting) { transform.parent = null; CurrentState = HexFunnelState.Attacking; TargetTransform = Target; GetAttackPosition(); SwitchToFire(); FireCoolDown = Random.Range(FireRandomInterval.x, FireRandomInterval.y); /* * MySignal.enabled = true; * MySignalCollider.enabled = true; */ ManagedBy.RestingFunnels.Remove(this); ManagedBy.ActiveFunnels.Add(this); StartCoroutine(Move()); //StartCoroutine(TryToShoot()); } }
public void SwitchToRecall() { HexFunnalCenterAnimator.SetBool("Guard", true); Shield.SetActive(false); CurrentState = HexFunnelState.Recalling; }