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

            if (dict == null)
            {
                LoadFromSavedData(dataKey);
            }
            else
            {
                dict.TryGetInt(IDKey, out _ID);
                dict.TryGetInt(MagazineSizeKey, out _MagazineSize);
                dict.TryGetInt(ConsumePerHitKey, out _ConsumePerHit);
                dict.TryGetInt(DamageValKey, out _DamageVal);
                dict.TryGetFloat(AtkIntervalKey, out _AtkInterval);
                dict.TryGetFloat(ChargeTimeKey, out _ChargeTime);
                dict.TryGetFloat(ReloadTimeKey, out _ReloadTime);
                dict.TryGetFloat(ThrustKey, out _Thrust);
                dict.TryGetFloat(AlertRangeKey, out _AlertRange);
                dict.TryGetString(PrefabPathKey, out _PrefabPath);
                dict.TryGetString(SkinNameKey, out _SkinName);

                string customDataKey;
                dict.TryGetString(OpaTypeKey, out customDataKey);
                _OpaType = new GDEEnum_OpaTypeData(customDataKey);
                dict.TryGetString(AniTypeKey, out customDataKey);
                _AniType = new GDEEnum_WeaponAniTypeData(customDataKey);
                LoadFromSavedData(dataKey);
            }
        }
Example #2
0
        public GDEEnum_WeaponAniTypeData ShallowClone()
        {
            string newKey = Guid.NewGuid().ToString();
            GDEEnum_WeaponAniTypeData newClone = new GDEEnum_WeaponAniTypeData(newKey);

            newClone.ID = ID;

            return(newClone);
        }
Example #3
0
        public void Reset_AniType()
        {
            GDEDataManager.ResetToDefault(_key, AniTypeKey);

            Dictionary <string, object> dict;

            GDEDataManager.Get(_key, out dict);

            string customDataKey;

            dict.TryGetString(AniTypeKey, out customDataKey);
            _AniType = new GDEEnum_WeaponAniTypeData(customDataKey);

            AniType.ResetAll();
        }
Example #4
0
        public override void LoadFromSavedData(string dataKey)
        {
            _key = dataKey;

            _ID            = GDEDataManager.GetInt(_key, IDKey, _ID);
            _MagazineSize  = GDEDataManager.GetInt(_key, MagazineSizeKey, _MagazineSize);
            _ConsumePerHit = GDEDataManager.GetInt(_key, ConsumePerHitKey, _ConsumePerHit);
            _DamageVal     = GDEDataManager.GetInt(_key, DamageValKey, _DamageVal);
            _AtkInterval   = GDEDataManager.GetFloat(_key, AtkIntervalKey, _AtkInterval);
            _ChargeTime    = GDEDataManager.GetFloat(_key, ChargeTimeKey, _ChargeTime);
            _ReloadTime    = GDEDataManager.GetFloat(_key, ReloadTimeKey, _ReloadTime);
            _Thrust        = GDEDataManager.GetFloat(_key, ThrustKey, _Thrust);
            _AlertRange    = GDEDataManager.GetFloat(_key, AlertRangeKey, _AlertRange);
            _PrefabPath    = GDEDataManager.GetString(_key, PrefabPathKey, _PrefabPath);
            _SkinName      = GDEDataManager.GetString(_key, SkinNameKey, _SkinName);

            _OpaType = GDEDataManager.GetCustom(_key, OpaTypeKey, _OpaType);
            _AniType = GDEDataManager.GetCustom(_key, AniTypeKey, _AniType);
        }
Example #5
0
        public GDEEnum_WeaponAniTypeData DeepClone()
        {
            GDEEnum_WeaponAniTypeData newClone = ShallowClone();

            return(newClone);
        }