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(); }
public void NextWeapon() { _weaponIterator.Next(); _currentWeapon = _weaponIterator.Current(); }