コード例 #1
0
    public List <GameButton> BuildButtonList(BoardPositon boardPositon, JoystickAssignment joystickAssignment)
    {
        List <GameButton> gbList = new List <GameButton>();

        List <KeyCode> keyCodeList    = GetKeyCodeListByJoystickAssignment(joystickAssignment);
        List <string>  buttonNameList = GetButtonNameListByBoardPosition(boardPositon);

        //Button names must be provided in the exact order they appear on the panel.
        for (int i = 0; i < buttonNameList.Count; i++)
        {
            gbList.Add(new GameButton(
                           keyCodeList[i],
                           buttonNameList[i]
                           ));
        }

        return(gbList);
    }
コード例 #2
0
    List <string> GetButtonNameListByBoardPosition(BoardPositon boardPositon)
    {
        switch (boardPositon)
        {
        case BoardPositon.A:
            return(new List <string>()
            {
                { "Play an Advertisement" },
                { "Holy Word: Annoy" },
                { "Flying Groin Stomp" },
                { "Cartwheeling Pile Driver" },
                { "Thrusting Hip Strike" },

                { "360 No Scope" },
                { "420 Blaze 'Em" },
                { "Spinning Neck Chop" },
                { "Spinning Meat Cleaver" },
                { "Splintering Mace Clout" },
            });

        case BoardPositon.B:
            return(new List <string>()
            {
                { "Vicious Chest Poke" },
                { "Bedazzling Blade" },
                { "Bewitching Blast" },
                { "Befuddling Backhand" },
                { "Liger's Paw Clasps the Wrist" },

                { "Activate Hax" },
                { "Super Intense Stare" },
                { "Super Insensitive Slander" },
                { "Tiger's Claw Grasps the Pearls" },
                { "Viper's Fang Stabs the Kiwis" }
            });

        case BoardPositon.C:
            return(new List <string>()
            {
                { "Long Distance Expectoration" },     //Especially Good Expectoration
                { "Short Distance Assassination" },    //Especially Good Expectoration
                { "Fake High Five" },
                { "Take Their Lives" },
                { "Poetry Choke Slam" },

                { "Sweep the Leg" },
                { "Sweep the Floor" },
                { "Spray and Pray" },
                { "Tank and Spank" },
                { "Spin to Win" },
            });

        case BoardPositon.D:
            return(new List <string>()
            {
                { "Blasphemous Belch" },
                { "Pulverizing Punch" },
                { "Taunt (A Second Time)" },
                { "Inflict Flesh Wound" },

                { "Rage Silently" },
                { "Flail Wildly" },
                { "Get Comfortable" },

                { "Mildly Magic Missile" },
                { "Mostly Magic Missile" },
                { "Markedly Magic Missile" },
            });

        case BoardPositon.Admin:
            return(new List <string>()
            {
                { "Enter" },
                { "Reset" },
                { "None1" },
                { "None2" },
                { "None3" },
                { "None4" },
                { "None5" },
                { "None6" },
                { "None7" },
                { "None8" }
            });

        default:
            throw new System.Exception("Invalid board positon.");
        }
    }