示例#1
0
    // Update is called once per frame
    void Update()
    {
        if (STATE.currentState == Battlemanager.BattleState.PLAYERCHOICE)
        {
            if (EventSystem.current.currentSelectedGameObject != null)
            {
                lastSelected = EventSystem.current.currentSelectedGameObject;
            }
            else
            {
                EventSystem.current.SetSelectedGameObject(lastSelected);
            }

            if (!CharSelect.coroutineOneRunning && !CharSelect.coroutineTwoRunning)
            {
                if (Input.GetKeyDown("a"))
                {
                    currentAlly.closeMenu();
                    goToLast();
                }

                if (Input.GetKeyDown("d"))
                {
                    currentAlly.closeMenu();
                    goToNext();
                }
            }
        }
        else if (STATE.currentState == Battlemanager.BattleState.START || STATE.currentState == Battlemanager.BattleState.PREBATTLE)
        {
            currentAlly = allyOne;
            allyOne.selectchar();
        }
        else
        {
            EventSystem.current.SetSelectedGameObject(null);
            CAMERA.resetCamera();
        }
    }
示例#2
0
 public void deselect()
 {
     closeMenu();
     CAMERA.resetCamera();
     EventSystem.current.SetSelectedGameObject(null);
 }