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()); }
public bool CanShoot(WeaponInfo weapon) { return(!_blockedWeapons[weapon.Id]); }
public void BlockWeapon(WeaponInfo weapon, float duration) { StartCoroutine(_blockWeaponCoroutine(duration, weapon.Id)); }