Esempio n. 1
0
    public void OnButtonDown(string pButtonName)
    {
        print(pButtonName);
        switch (pButtonName)
        {
        case "buildingRedBtn_tex":
            inGameManager.AddBuilding(Players.Player1);
            break;

        case "buildingBlueBtn_tex":
            inGameManager.AddBuilding(Players.Player2);
            break;

        case "factoryRedBtn_tex":
            inGameManager.AddFactory(Players.Player1);
            break;

        case "factoryBlueBtn_tex":
            inGameManager.AddFactory(Players.Player2);
            break;

        case "energyRedBtn_tex":
            inGameManager.AddEnergyPlant(Players.Player1);
            break;

        case "energyBlueBtn_tex":
            inGameManager.AddEnergyPlant(Players.Player2);
            break;

        case "labRedBtn_tex":
            inGameManager.AddLab(Players.Player1);
            break;

        case "labBlueBtn_tex":
            inGameManager.AddLab(Players.Player2);
            break;

        case "defenderRedBtn_tex":
            inGameManager.AddMissileDefender(Players.Player1);
            break;

        case "defenderBlueBtn_tex":
            inGameManager.AddMissileDefender(Players.Player2);
            break;

        case "missileRedBtn_tex":
            inGameManager.AddMissileLauncher(Players.Player1);
            break;

        case "missileBlueBtn_tex":
            inGameManager.AddMissileLauncher(Players.Player2);
            break;

        case "stoneRedBtn_tex":
            inGameManager.AddQuarry(Players.Player1);
            break;

        case "stoneBlueBtn_tex":
            inGameManager.AddQuarry(Players.Player2);
            break;

        case "metalRedBtn_tex":
            inGameManager.AddMetalFactory(Players.Player1);
            break;

        case "metalBlueBtn_tex":
            inGameManager.AddMetalFactory(Players.Player2);
            break;

        case "woodRedBtn_tex":
            inGameManager.AddWoodMill(Players.Player1);
            break;

        case "woodBlueBtn_tex":
            inGameManager.AddWoodMill(Players.Player2);
            break;

        default:
            break;
        }
    }