Exemplo n.º 1
0
        void Awake()
        {
            var solidity = new Solidity(100, 0);
            var weapons  = new WeaponInfo[WeaponIDs.Length];

            _blockedWeapons = new Dictionary <string, bool>();
            for (var i = 0; i < WeaponIDs.Length; i++)
            {
                weapons[i] = WeaponLoader.LoadWeapon(WeaponIDs[i]);
                _blockedWeapons.Add(weapons[i].Id, false);
            }

            _shellFactory = new ShellFactory();
            var battleStats = new PlayerBattleStats(solidity, 100, 1, weapons);

            BattleController = new PlayerBattleController(battleStats, this, this);

            StartCoroutine(Regenerate());
            StartCoroutine(Oscillate());
        }
Exemplo n.º 2
0
 public bool CanShoot(WeaponInfo weapon)
 {
     return(!_blockedWeapons[weapon.Id]);
 }
Exemplo n.º 3
0
 public void BlockWeapon(WeaponInfo weapon, float duration)
 {
     StartCoroutine(_blockWeaponCoroutine(duration, weapon.Id));
 }