public static IHtmlString Get(this LocalizationHelper helper, string key, params object[] replaceValues)
        {
            var parsedResource = ResourceParser.Parse(key);
            var resourceValue  = helper.HtmlHelper.ViewContext.HttpContext.GetGlobalResourceObject(parsedResource.ResourceSet, parsedResource.ResourceKey).ToString();

            return(helper.HtmlHelper.Raw(ResourceFormatter.Format(resourceValue, replaceValues)));
        }
Esempio n. 2
0
    void UpdateGoldCost(Dictionary <string, Resource> resources)
    {
        GoldResource gold = (GoldResource)resources[ResourceType.GOLD];

        Text goldCost = GameObject.Find(UIConstants.UPGRADE_ARMY_COST)
                        .GetComponent <Text>();

        goldCost.text = ResourceFormatter.Format(gold.upgradeCost) + " " +
                        UIConstants.ARMY_SYMBOL;
    }
Esempio n. 3
0
    void UpdateArmyCost(Dictionary <string, Resource> resources)
    {
        ArmyResource army = (ArmyResource)resources[ResourceType.ARMY];

        Text armyCost = GameObject.Find(UIConstants.UPGRADE_GOLD_COST)
                        .GetComponent <Text>();

        armyCost.text = ResourceFormatter.Format(army.upgradeCost) + " " +
                        UIConstants.GOLD_SYMBOL;
    }
Esempio n. 4
0
    void UpdateResource(Dictionary <string, Resource> resources,
                        string textKey,
                        string resourceKey)
    {
        Text resourceText = GameObject.Find(textKey)
                            .GetComponent <Text>();
        Resource resource = resources[resourceKey];

        resourceText.text = ResourceFormatter.Format(resource.currentAmount);
    }