Esempio n. 1
0
        private void SetNeed(Dwarf dwarf, DwarfNeed need)
        {
            var existsInDictionary = uiPerDwarf.ContainsKey(dwarf);
            var itemUi             = existsInDictionary ? uiPerDwarf[dwarf] : GetNewItemUi();

            if (!existsInDictionary)
            {
                uiPerDwarf.Add(dwarf, itemUi);
            }
            itemUi.icon = Sprites.Of($"needs.{need}");
            itemUi.fill = dwarf.GetNeedValue(need);
        }