Exemple #1
0
        public void Set(GodDefinition definition, GodFakeData fakeData)
        {
            if (definition == null || fakeData == null)
            {
                m_name.get_gameObject().SetActive(false);
                m_ambience.get_gameObject().SetActive(false);
                return;
            }
            string title       = fakeData.title;
            string description = fakeData.description;

            m_illu.set_sprite(fakeData.illu);
            m_name.SetText(title);
            m_name.get_gameObject().SetActive(!string.IsNullOrEmpty(title));
            m_ambience.SetText(description);
            m_ambience.get_gameObject().SetActive(!string.IsNullOrEmpty(description));
        }
        private List <Tuple <GodDefinition, GodFakeData> > GetDisplayedGods()
        {
            List <Tuple <GodDefinition, GodFakeData> > list = new List <Tuple <GodDefinition, GodFakeData> >();

            GodFakeData[] gods = m_fakeData.gods;
            int           num  = gods.Length;

            for (int i = 0; i < num; i++)
            {
                GodFakeData godFakeData = gods[i];
                if (!RuntimeData.godDefinitions.TryGetValue(godFakeData.god, out GodDefinition value))
                {
                    Log.Error($"Cannot find god definition with family {godFakeData.god}", 105, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Demo\\Code\\UI\\GodSelection\\GodSelectionUIDemo.cs");
                }
                else
                {
                    list.Add(new Tuple <GodDefinition, GodFakeData>(value, godFakeData));
                }
            }
            return(list);
        }