Beispiel #1
0
 public virtual void ExitHover()
 {
     if (CastleManager.showLog)
     {
         print("Exit hover: " + gameObject.tag);
     }
     hoverState       = CastleManager.HoverState.ExitHover;
     hoverTimer       =
         hoverFloored = 0;
     StartCoroutine(ExitHoverDelay());
 }
Beispiel #2
0
        public virtual void EnterHover()
        {
            if (CastleManager.showLog)
            {
                print("Enter hover: " + gameObject.tag);
            }

            hoverState       = CastleManager.HoverState.EnterHover;
            hoverTimer       =
                hoverFloored = 0;
        }
Beispiel #3
0
 public virtual void Hover()
 {
     hoverState = CastleManager.HoverState.Hover;
     if (hoverFloored < Mathf.FloorToInt(hoverTimer))
     {
         hoverFloored = Mathf.FloorToInt(hoverTimer);
         if (CastleManager.showLog)
         {
             print("Hovering: " + gameObject.tag + " for " + hoverFloored + " seconds");
         }
     }
     hoverTimer += Time.deltaTime;
 }
Beispiel #4
0
        IEnumerator ExitHoverDelay()
        {
            yield return(new WaitForEndOfFrame());

            hoverState = CastleManager.HoverState.None;
        }