Beispiel #1
0
        //gives last button pressed new command
        private void GiveCommand(ref Command command)
        {
            switch (buttonBeingRemapped)
            {
            case 0:
                command = new Jump();
                buttonBeingRemapped++;
                break;

            case 1:
                command = new SpawnCube();
                buttonBeingRemapped++;
                break;

            case 2:
                command = new SpawnTree();
                buttonBeingRemapped++;
                break;

            case 3:
                command = new SpawnCrystals();
                buttonBeingRemapped++;
                break;

            case 4:
                command = new SpawnTower();
                buttonBeingRemapped++;
                break;

            case 5:
                command = new UndoButton();
                buttonBeingRemapped++;
                break;

            case 6:
                command = new RemapButton();
                buttonBeingRemapped++;
                break;
            }
        }
Beispiel #2
0
        void Start()
        {
            //links object creation to specific buttons
            XButton        = new Jump();
            CircleButton   = new DoNothing();
            SquareButton   = new DoNothing();
            TriangleButton = new DoNothing();
            DPadUp         = new DoNothing();
            DPadDown       = new DoNothing();
            DPadLeft       = new UndoButton();
            DPadRight      = new DoNothing();
            R1             = new SpawnCube();
            L1             = new SpawnTree();
            LStickPress    = new DoNothing();
            RStickPress    = new DoNothing();
            Pause          = new DoNothing();
            Select         = new RemapButton();
            RightTrigger   = new SpawnTower();
            LeftTrigger    = new SpawnCrystals();

            inputs.Push(XButton);
        }