public DataManager(Game game)
            : base(game)
        {
            _switches = new SwitchCollection();
            _variables = new VariableCollection();
            _achievementsToCreate = new Stack<Achievement>();

            _switches["Achievement Test"] = new Switch()
            {
                Name = "Achievement Test"
            };
            _switches["switch_ponies"] = new Switch()
            {
                Name = "Multi Switch Check Test"
            };

            _switches["Achievement Test"].TurnOn();
            PlayerName = new Variable("Pinkie Pie");
            PlayerGold = new Variable(1000);
            PlayerSteps = new Variable(0);
            PlayerName.Value = "Pinkie Pie";
            _variables["{steps_taken}"] = PlayerSteps;
            _variables["{profilename}"] = PlayerName;
            _variables["{gold}"] = PlayerGold;
        }
        public DataManager(Game game)
            : base(game)
        {
            _switches = new SwitchCollection();
            _variables = new VariableCollection();

            _switches["Achievement Test"] = new Switch()
            {
                Name = "Achievement Test"
            };
            _switches["switch_ponies"] = new Switch()
            {
                Name = "Multi Switch Check Test"
            };

            _playerParty = new BattleDataCollection();
            _playerCharacters = new BattleDataCollection();
            _enemyCollection = new BattleDataCollection();

            _switches["Achievement Test"].TurnOn();
            PlayerName = new Variable("Pinkie Pie");
            PlayerGold = new Variable(1000);
            PlayerSteps = new Variable(0);
            PlayerName.Value = "Pinkie Pie";
            _variables["{steps_taken}"] = PlayerSteps;
            _variables["{profilename}"] = PlayerName;
            _variables["{gold}"] = PlayerGold;
        }
 public BattleController()
 {
     _characters = new BattleData[2];
     _characters[0] = Player.CharacterData.Slow_Character;
     _characters[1] = Player.CharacterData.Fast_Character;
     _lastBattleDamage = new Variable(0);
     Systems.DataManager.SetVariable("{lastdamage}", _lastBattleDamage);
     _selectAction = false;
 }
        public static MethodResult CreateVariable(object sender, IEventInput input)
        {
            var vInput = (CreateVariableInput)input;

            Variable newVar = new Variable(vInput.Value);

            DataManager.SetVariable(vInput.Name, newVar);
            return MethodResult.Success;
        }
 public void SetVariable(string name, Variable value)
 {
     if (_variables.ContainsKey(name))
     {
         _variables[name] = value;
     }
     else
     {
         value.OnValueChange += DataChange;
         _variables.Add(name, value);
     }
 }
 public static void SetVariable(string name, Variable value)
 {
     if (_variables.ContainsKey(name))
     {
         _variables[name] = value;
     }
     else
         _variables.Add(name, value);
 }