Exemplo n.º 1
0
    public void Recruit()
    {
        Debug.Log("Is Pressed!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
        App    app    = UnityEngine.Object.FindObjectOfType <App>();
        Nation player = State.getNations()[app.GetHumanIndex()];

        if (type == 1)
        {
            PlayerPayer.PayFrigate(player);
            recruitingText.text = player.getNavyProducing(MyEnum.NavyUnits.frigates).ToString();
            recruitingText.text = player.getArmyProducing(MyEnum.ArmyUnits.infantry).ToString();
        }
        if (type == 2)
        {
            PlayerPayer.PayIronClad(player);
            recruitingText.text = player.getNavyProducing(MyEnum.NavyUnits.ironclad).ToString();
        }
        if (type == 3)
        {
            PlayerPayer.PayDreadnought(player);
            recruitingText.text = player.getNavyProducing(MyEnum.NavyUnits.dreadnought).ToString();

            freePOP.text = player.getUrbanPOP().ToString();
            AP.text      = player.getAP().ToString();
            UpdateRecruitButtons(player);
        }
    }
Exemplo n.º 2
0
    public void RecruitBattleship()
    {
        App    app    = UnityEngine.Object.FindObjectOfType <App>();
        Nation player = State.getNations()[app.GetHumanIndex()];

        PlayerPayer.PayDreadnought(player);
        recruitingBattleshipsText.text = player.getNavyProducing(MyEnum.NavyUnits.dreadnought).ToString();
        AP.text = player.getAP().ToString();
        UpdateNavalRectuitButtons(player);
        upgradeShipyardButton.interactable = false;
    }