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

            if (dict == null)
            {
                LoadFromSavedData(dataKey);
            }
            else
            {
                dict.TryGetFloat(localScaleKey, out _localScale);
                dict.TryGetFloat(aggroKey, out _aggro);
                dict.TryGetFloat(counterKey, out _counter);
                dict.TryGetFloat(reflectKey, out _reflect);
                dict.TryGetFloat(stunKey, out _stun);
                dict.TryGetFloat(criticalKey, out _critical);
                dict.TryGetFloat(poisonKey, out _poison);
                dict.TryGetFloat(bleedKey, out _bleed);
                dict.TryGetFloat(slowKey, out _slow);
                dict.TryGetFloat(pierceKey, out _pierce);
                dict.TryGetFloat(flameKey, out _flame);
                dict.TryGetString(weaponNameKey, out _weaponName);
                dict.TryGetString(typeNameKey, out _typeName);
                dict.TryGetString(raceNameKey, out _raceName);
                dict.TryGetString(shapePathKey, out _shapePath);

                string customDataKey;
                dict.TryGetString(projectileKeyKey, out customDataKey);
                _projectileKey = new GDEProjectileData(customDataKey);
                dict.TryGetString(extraProjectileKeyKey, out customDataKey);
                _extraProjectileKey = new GDEProjectileData(customDataKey);
                LoadFromSavedData(dataKey);
            }
        }
Exemple #2
0
        public GDEProjectileData ShallowClone()
        {
            string            newKey   = Guid.NewGuid().ToString();
            GDEProjectileData newClone = new GDEProjectileData(newKey);

            newClone.shapePath  = shapePath;
            newClone.fsmPath    = fsmPath;
            newClone.localScale = localScale;

            return(newClone);
        }
Exemple #3
0
        public void Reset_extraProjectileKey()
        {
            GDEDataManager.ResetToDefault(_key, extraProjectileKeyKey);

            Dictionary <string, object> dict;

            GDEDataManager.Get(_key, out dict);

            string customDataKey;

            dict.TryGetString(extraProjectileKeyKey, out customDataKey);
            _extraProjectileKey = new GDEProjectileData(customDataKey);

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

            _localScale = GDEDataManager.GetFloat(_key, localScaleKey, _localScale);
            _aggro      = GDEDataManager.GetFloat(_key, aggroKey, _aggro);
            _counter    = GDEDataManager.GetFloat(_key, counterKey, _counter);
            _reflect    = GDEDataManager.GetFloat(_key, reflectKey, _reflect);
            _stun       = GDEDataManager.GetFloat(_key, stunKey, _stun);
            _critical   = GDEDataManager.GetFloat(_key, criticalKey, _critical);
            _poison     = GDEDataManager.GetFloat(_key, poisonKey, _poison);
            _bleed      = GDEDataManager.GetFloat(_key, bleedKey, _bleed);
            _slow       = GDEDataManager.GetFloat(_key, slowKey, _slow);
            _pierce     = GDEDataManager.GetFloat(_key, pierceKey, _pierce);
            _flame      = GDEDataManager.GetFloat(_key, flameKey, _flame);
            _weaponName = GDEDataManager.GetString(_key, weaponNameKey, _weaponName);
            _typeName   = GDEDataManager.GetString(_key, typeNameKey, _typeName);
            _raceName   = GDEDataManager.GetString(_key, raceNameKey, _raceName);
            _shapePath  = GDEDataManager.GetString(_key, shapePathKey, _shapePath);

            _projectileKey      = GDEDataManager.GetCustom(_key, projectileKeyKey, _projectileKey);
            _extraProjectileKey = GDEDataManager.GetCustom(_key, extraProjectileKeyKey, _extraProjectileKey);
        }
Exemple #5
0
        public GDEProjectileData DeepClone()
        {
            GDEProjectileData newClone = ShallowClone();

            return(newClone);
        }