Esempio n. 1
0
        public PlayerModel(PlayerRecord record)
        {
            var weapon = WeaponFactory.GetList(record.Weapon);

            _weaponIterator = new CustomIterator <IWeapon>(weapon);

            //Debug.Log("Weapon inited " + _weaponIterator.Length);

            Health         = record.Health;
            Armor          = record.Armor;
            Speed          = record.Speed;
            _currentWeapon = _weaponIterator.Current();
        }
Esempio n. 2
0
 public void NextWeapon()
 {
     _weaponIterator.Next();
     _currentWeapon = _weaponIterator.Current();
 }