示例#1
0
 public void SwitchToFire()
 {
     GuardMode = false;
     HexFunnalCenterAnimator.SetBool("Guard", false);
     Shield.SetActive(false);
     CurrentState = HexFunnelState.Attacking;
     GetAttackPosition();
 }
示例#2
0
 public void SwitchToGuard()
 {
     GuardMode = true;
     HexFunnalCenterAnimator.SetBool("Guard", true);
     Shield.SetActive(true);
     CurrentState = HexFunnelState.Guarding;
     GetGuardPosition();
 }
示例#3
0
    public void Recall()
    {
        if (CurrentState != HexFunnelState.Resting)
        {
            ObjectToFollow = RestParent;
            FollowOffset   = Vector3.zero;
            SwitchToRecall();
            CurrentState = HexFunnelState.Recalling;

            ManagedBy.ActiveFunnels.Remove(this);
            ManagedBy.RestingFunnels.Add(this);
        }
    }
示例#4
0
    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;
             */
        }
    }
示例#5
0
    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());
        }
    }
示例#6
0
 public void SwitchToRecall()
 {
     HexFunnalCenterAnimator.SetBool("Guard", true);
     Shield.SetActive(false);
     CurrentState = HexFunnelState.Recalling;
 }