示例#1
0
 public static void ResetState()
 {
     ActionDetails.ResetDetails();
     InputController.staticCharacterPointer.ResetCameraTransform();
     if (instance)
     {
         instance.Invoke("Pop", 1.5f);
     }
 }
示例#2
0
    public override Transform GetNextCursorItem(int currentIndex)
    {
        int       nextIndex      = (currentIndex + 1) % menuChoices.Length;
        Transform nextMenuChoice = menuChoices[nextIndex];

        if (nextIndex == (int)MenuOptions.Defend)
        {
            ActionDetails.ActionDescription(inputController.playerInfo.owner.defendAction.description);
        }
        else
        {
            ActionDetails.ResetDetails();
        }
        return(nextMenuChoice);
    }
示例#3
0
 void Update()
 {
     if (IsPointingAtCharacters())
     {
         if (Input.GetKeyDown(KeyCode.LeftArrow))
         {
             characterPointer.AdvancePointerBackward();
         }
         else if (Input.GetKeyDown(KeyCode.RightArrow))
         {
             characterPointer.AdvancePointerForward();
         }
         else if (Input.GetKeyDown(KeyCode.Return))
         {
             // Select target
             activeMenu.RunMenuOption(cursor.GetCursorIndex(), characterPointer.GetTarget());
             characterPointer.DisablePointer();
             characterPointer.ResetCameraTransform();
         }
         else if (Input.GetKeyDown(KeyCode.Escape))
         {
             // Return to normal UI
             characterPointer.DisablePointer();
             characterPointer.ResetCameraTransform();
             ActionDetails.ResetDetails();
         }
     }
     else if (activeMenu != null)
     {
         if (Input.GetKeyDown(KeyCode.DownArrow))
         {
             IncrementCursor();
         }
         else if (Input.GetKeyDown(KeyCode.UpArrow))
         {
             DecrementCursor();
         }
         else if (Input.GetKeyDown(KeyCode.Return))
         {
             SelectMenuItem();
         }
         else if (Input.GetKeyDown(KeyCode.LeftArrow))
         {
             ReturnToBaseMenu();
         }
     }
 }
示例#4
0
    public override Transform GetPrevCursorItem(int currentIndex)
    {
        int nextIndex = currentIndex - 1;

        if (nextIndex < 0)
        {
            nextIndex = menuChoices.Length - 1;
        }
        Transform prevMenuChoice = menuChoices[nextIndex];

        if (nextIndex == (int)MenuOptions.Defend)
        {
            ActionDetails.ActionDescription(inputController.playerInfo.owner.defendAction.description);
        }
        else
        {
            ActionDetails.ResetDetails();
        }
        return(prevMenuChoice);
    }