Example #1
0
    private void Update()
    {
        var resourceBankOfTeam = ResourceSystem.GetResourceBankOfTeam(team);

        if (resourceBankOfTeam == null)
        {
            return;
        }

        if (foodText != null)
        {
            foodText.text = resourceBankOfTeam.foodCount.ToString();
        }
        if (woodText != null)
        {
            woodText.text = resourceBankOfTeam.woodCount.ToString();
        }
        if (goldText != null)
        {
            goldText.text = resourceBankOfTeam.goldCount.ToString();
        }
        if (stoneText != null)
        {
            stoneText.text = resourceBankOfTeam.stoneCount.ToString();
        }
    }