public override void LoadFromDict(string dataKey, Dictionary <string, object> dict)
        {
            _key = dataKey;

            if (dict == null)
            {
                LoadFromSavedData(dataKey);
            }
            else
            {
                dict.TryGetGameObject(go_fieldKey, out _go_field);
                dict.TryGetTexture2D(tex_fieldKey, out _tex_field);
                dict.TryGetMaterial(mat_fieldKey, out _mat_field);
                dict.TryGetAudioClip(aud_fieldKey, out _aud_field);

                dict.TryGetGameObjectList(go_list_fieldKey, out go_list_field);
                LoadFromSavedData(dataKey);
            }
        }
        public override void LoadFromDict(string dataKey, Dictionary<string, object> dict)
        {
            _key = dataKey;

            if (dict == null)
                LoadFromSavedData(dataKey);
            else
            {
                dict.TryGetInt(KnockbackKey, out _Knockback);
                dict.TryGetInt(AttackRangeKey, out _AttackRange);
                dict.TryGetInt(CostOfUseKey, out _CostOfUse);
                dict.TryGetInt(numberOfUsesKey, out _numberOfUses);
                dict.TryGetString(itemTypeKey, out _itemType);
                dict.TryGetGameObject(ItemModelKey, out _ItemModel);
                LoadFromSavedData(dataKey);
            }
        }
        public override void LoadFromDict(string dataKey, Dictionary<string, object> dict)
        {
            _key = dataKey;

            if (dict == null)
                LoadFromSavedData(dataKey);
            else
            {
                dict.TryGetGameObject(go_fieldKey, out _go_field);
                dict.TryGetTexture2D(tex_fieldKey, out _tex_field);
                dict.TryGetMaterial(mat_fieldKey, out _mat_field);
                dict.TryGetAudioClip(aud_fieldKey, out _aud_field);

                dict.TryGetGameObjectList(go_list_fieldKey, out go_list_field);
                LoadFromSavedData(dataKey);
            }
        }
        public override void LoadFromDict(string dataKey, Dictionary<string, object> dict)
        {
            _key = dataKey;

            if (dict == null)
                LoadFromSavedData(dataKey);
            else
            {
                dict.TryGetInt(projectileRangeKey, out _projectileRange);
                dict.TryGetInt(numberOfUsesKey, out _numberOfUses);
                dict.TryGetInt(CostOfUseKey, out _CostOfUse);
                dict.TryGetFloat(itemDurationKey, out _itemDuration);
                dict.TryGetString(itemTypeKey, out _itemType);
                dict.TryGetGameObject(ItemModelKey, out _ItemModel);
                LoadFromSavedData(dataKey);
            }
        }
Esempio n. 5
0
        public override void LoadFromDict(string dataKey, Dictionary<string, object> dict)
        {
            _key = dataKey;

            if (dict == null)
                LoadFromSavedData(dataKey);
            else
            {
                dict.TryGetBool(stage_lockKey, out _stage_lock);
                dict.TryGetInt(base_scoreKey, out _base_score);
                dict.TryGetInt(high_scoreKey, out _high_score);
                dict.TryGetFloat(remain_fuelKey, out _remain_fuel);
                dict.TryGetFloat(base_fuelKey, out _base_fuel);
                dict.TryGetGameObject(game_objectKey, out _game_object);
                LoadFromSavedData(dataKey);
            }
        }