コード例 #1
0
ファイル: InputManager.cs プロジェクト: Veetiglik/TestStuff
		public void Set(Header.e_ButtonAction actionSet, Header.Func<int> ActionPressedSet, string nameOfInputAxisSet, string nameOfInputAxisSet2)
        {
            action = actionSet;
            actionPressed = ActionPressedSet;
			nameOfInputAxis = nameOfInputAxisSet;
			nameOfInputAxis2 = nameOfInputAxisSet2;
        }
コード例 #2
0
        public void MenuInputReceieve(int playerId, Header.e_ButtonAction action)
        {
            switch (menuStateObject.menuState)
            {
            case e_MenuInputState.SELECTINGWITHCURSOR:
            {
                //different switch statement based on current menu state (selecting up and down versus now choosing an input)
                switch (action)
                {
                case Header.e_ButtonAction.UP:
                    SelectMenuUp();
                    break;

                case Header.e_ButtonAction.RIGHT:
                    return;

                case Header.e_ButtonAction.DOWN:
                    SelectMenuDown();
                    break;

                case Header.e_ButtonAction.LEFT:
                    return;

                case Header.e_ButtonAction.ACCEPT:
                    SelectWithCursorAccept();
                    return;

                case Header.e_ButtonAction.DECLINE:
                    return;

                default:
                    return;
                }
                break;
            }

            case e_MenuInputState.SELECTINGWITHUNDERLINE:
            {
                //different switch statement based on current menu state (selecting up and down versus now choosing an input)
                switch (action)
                {
                case Header.e_ButtonAction.UP:
                    break;

                case Header.e_ButtonAction.RIGHT:
                    SelectUnderlineRight();
                    return;

                case Header.e_ButtonAction.DOWN:
                    break;

                case Header.e_ButtonAction.LEFT:
                    SelectUnderlineLeft();
                    return;

                case Header.e_ButtonAction.ACCEPT:
                    SelectWithUnderlineAccept();
                    return;

                case Header.e_ButtonAction.DECLINE:
                    SelectWithUnderlineDecline();
                    return;

                default:
                    return;
                }
                break;
            }

            case e_MenuInputState.SELECTINGNEWINPUT:
                //TODO:
                break;
            }
        }