// TWIN ATTACK private static void CheckTwinAttack() { Upgrade.GenericSecondaryWeapon chosenSecondaryWeapon = ChosenWeapon as Upgrade.GenericSecondaryWeapon; if (chosenSecondaryWeapon != null && chosenSecondaryWeapon.IsTwinAttack) { if (attacksCounter == 0) { attacksCounter++; //Here start attack AttackStep = CombatStep.Attack; Selection.ActiveShip = Attacker; ShotStart(); } else { attacksCounter = 0; CheckMissedAttack(); } } else { CheckMissedAttack(); } }
public static void ShowAttackAnimationAndSound() { Upgrade.GenericSecondaryWeapon chosenSecondaryWeapon = ChosenWeapon as Upgrade.GenericSecondaryWeapon; if (chosenSecondaryWeapon != null) { if (chosenSecondaryWeapon.Type == Upgrade.UpgradeType.Torpedoes || chosenSecondaryWeapon.Type == Upgrade.UpgradeType.Missiles) { Sounds.PlayShots("Proton-Torpedoes", 1); Selection.ThisShip.AnimateMunitionsShot(); } else if (chosenSecondaryWeapon.Type == Upgrade.UpgradeType.Turret) { Sounds.PlayShots(Selection.ActiveShip.SoundShotsPath, Selection.ActiveShip.ShotsCount); Selection.ThisShip.AnimateTurretWeapon(); } } else { Sounds.PlayShots(Selection.ActiveShip.SoundShotsPath, Selection.ActiveShip.ShotsCount); Selection.ThisShip.AnimatePrimaryWeapon(); } }
private static void CheckTwinAttack() { Upgrade.GenericSecondaryWeapon chosenSecondaryWeapon = ChosenWeapon as Upgrade.GenericSecondaryWeapon; if (chosenSecondaryWeapon != null && chosenSecondaryWeapon.IsTwinAttack) { if (attacksCounter == 0) { attacksCounter++; AttackStep = CombatStep.Attack; Selection.ActiveShip = Attacker; AttackDiceRoll(); } else { attacksCounter = 0; CallCombatEndEvents(); } } else { CallCombatEndEvents(); } }
public static void SelectWeapon(Upgrade.GenericSecondaryWeapon secondaryWeapon = null) { SecondaryWeapon = secondaryWeapon; }