public override void SetData(Dictionary <string, object> data)
        {
            base.SetData(data);

            Body     = Get <string>(data, KEY_BODY);
            Rating   = GetInt(data, KEY_RATING);
            Category = CreateDataNameObject(data, KEY_CATEGORY);
        }
Exemplo n.º 2
0
        public static DataNameObject CreateDataNameObject(Dictionary <string, object> data, string key)
        {
            Dictionary <string, object> nameObjectData = GetDict(data, key);
            DataNameObject nameObject = new DataNameObject();

            nameObject.SetData(nameObjectData);
            return(nameObject);
        }
Exemplo n.º 3
0
        private void RefreshFAQ()
        {
            if (DataManager.FAQ.Data == null)
            {
                return;
            }

            Clear();

            mFAQEntries = new ExpandableInfoBox[DataManager.FAQ.Data.Length];

            for (int i = 0; i < DataManager.FAQ.Data.Length; i++)
            {
                DataNameObject faq = DataManager.FAQ.Data[i];
                mFAQEntries[i] = Instantiate(mFAQPrefab, mContentRoot);
                mFAQEntries[i].Initialize(faq.Name, faq.Description);
            }

            for (int i = 0; i < mFAQEntries.Length; i++)
            {
                mFAQEntries[i].SetState(false);
            }
        }