Example #1
0
    public void AddVillagerView(Villager villager, int index)
    {
        VillagerView villagerView = Instantiate(m_VillagerViewPrefab, Content).GetComponent <VillagerView>();

        villagerView.SetStats((int)villager.WoodProduction, (int)villager.FoodProduction, (int)villager.FaithProduction);
        villagerView.Index           = index;
        villagerView.OnActionButton += (i) => { Sacrifice(villager); };
    }
Example #2
0
    public void AddVillagerView(Villager villager)
    {
        m_Count++;
        VillagerView villagerView = Instantiate(m_VillagerViewPrefab, Content).GetComponent <VillagerView>();

        villagerView.SetStats((int)villager.WoodProduction, (int)villager.FoodProduction, (int)villager.FaithProduction);
        villagerView.OnActionButton += (i) => { Recruit(villager); };

        if (m_RecruitCount == 0)
        {
            villagerView.DisableActionButton();
        }
    }