Esempio n. 1
0
    public void ThatFillInData(assemblyCsharp.Province province)
    {
        this.Name.text = province.getProvName();
        string resource = province.getResource().ToString();

        Sprite newResourceSprite = Resources.Load("Resource/" + resource, typeof(Sprite)) as Sprite;

        this.Resource.sprite         = newResourceSprite;
        this.Resource.preserveAspect = true;
        Debug.Log("You f****r...." + province.getProduction().ToString());
        this.Produces.text      = "Produces " + province.getProduction().ToString("0.0") + " " + resource + " /turn";
        this.RailroadLevel.text = province.getInfrastructure().ToString();
        this.FortLevel.text     = province.getFortLevel().ToString();
        this.Culture.text       = "Culture: " + province.culture;
        // this.resourceText.text = "Province produces " + resource;
        string nation = province.getOwner().ToString();

        Debug.Log("Owner: " + nation);
        this.DevelopmentLevel.text = province.getDevelopmentLevel().ToString();
        this.NationName.text       = nation;
        //text.text = "Province produces " + Resource;
        this.Flag.sprite = Resources.Load("Flags/" + province.getOwner().ToString(), typeof(Sprite)) as Sprite;
        pickProductionPicture(province);
        // Text flagText = FlagTip.GetComponentInChildren<Text>();
        // Debug.Log("Flag text: " + flagText.text);
        // flagText.text = Owner;
        //flagTip.GetComponent<Text>().text = nation;
    }
Esempio n. 2
0
    public void ThisFillInData(assemblyCsharp.Province province)
    {
        this.Name.text = province.getProvName();
        string resource          = province.getResource().ToString();
        Sprite newResourceSprite = Resources.Load("Resource/" + resource, typeof(Sprite)) as Sprite;

        this.Resource.sprite         = newResourceSprite;
        this.Resource.preserveAspect = true;

        this.Produces.text      = "Produces " + province.getProduction().ToString("0.0") + " " + resource + " /turn";
        this.RailroadLevel.text = province.getInfrastructure().ToString();
        this.FortLevel.text     = province.getFortLevel().ToString();
        this.Culture.text       = "Culture: " + province.culture;
        // this.resourceText.text = "Province produces " + resource;
        // Text text = ResourceTip.GetComponentInChildren<Text>();
        // text.text =  "Province produces " + Resource;
        pickProductionPicture(province);

        State.setCurrentlySelectedProvince(province.getIndex());
        App    app         = UnityEngine.Object.FindObjectOfType <App>();
        int    playerIndex = app.GetHumanIndex();
        Nation player      = State.getNations()[playerIndex];

        updateSelfProvinceButtons(player, province);
    }
Esempio n. 3
0
    private void UpgradeRailway()
    {
        App    app       = UnityEngine.Object.FindObjectOfType <App>();
        Nation player    = State.getNations()[app.GetHumanIndex()];
        int    provIndex = State.getCurrentlySelectedProvince();

        assemblyCsharp.Province prov = State.getProvinces()[provIndex];
        PlayerPayer.payRailRoad(player, prov);
        this.RailroadLevel.text = prov.getInfrastructure().ToString();
        AP.text = player.getAP().ToString();
        updateSelfProvinceButtons(player, prov);
    }
    public static int getNumberProvRailRoads(Nation player)
    {
        int amount = 0;

        for (int i = 0; i < player.getProvinces().Count; i++)
        {
            int pIndex = player.getProvinces()[i];
            assemblyCsharp.Province prov = State.getProvinces()[pIndex];
            amount += prov.getInfrastructure();
        }
        return(amount);
    }
Esempio n. 5
0
    public void ThatFillInData(assemblyCsharp.Province province)
    {
        this.Name.text = province.getProvName();
        string resource = province.getResource().ToString();

        Sprite newResourceSprite = Resources.Load("Resource/" + resource, typeof(Sprite)) as Sprite;

        this.Resource.sprite    = newResourceSprite;
        this.Produces.text      = "Produces " + Produces.ToString() + " " + resource + " /turn";
        this.RailroadLevel.text = province.getInfrastructure().ToString();
        this.FortLevel.text     = province.getFortLevel().ToString();
        this.Culture.text       = "Culture: " + province.culture;
        this.resourceText.text  = "Province produces " + resource;
        string nation = province.getOwner().ToString();

        this.NationName.text = nation;
        //text.text = "Province produces " + Resource;
        this.Flag.sprite = Resources.Load("Flags/" + province.getOwner().ToString(), typeof(Sprite)) as Sprite;
        // Text flagText = FlagTip.GetComponentInChildren<Text>();
        // Debug.Log("Flag text: " + flagText.text);
        // flagText.text = Owner;
    }