示例#1
0
 public void Load(string name, ref War3Player war3Player)
 {
     if (_mementoDict.ContainsKey(name))
     {
         War3Mementor war3Mementor = _mementoDict[name];
         war3Player.Attack  = war3Mementor.Attack;
         war3Player.Breath  = war3Mementor.Breath;
         war3Mementor.Level = war3Mementor.Level;
     }
 }
示例#2
0
        public void Save(string name, War3Player war3Player)
        {
            War3Mementor war3Mementor = new War3Mementor()
            {
                Attack = war3Player.Attack,
                Breath = war3Player.Breath,
                Level  = war3Player.Level
            };

            _mementoDict.Add(name, war3Mementor);
        }