Exemple #1
0
    // 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();
        }
    }
Exemple #2
0
 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();
     }
 }
Exemple #3
0
    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();
        }
    }
Exemple #4
0
 public static void SelectWeapon(Upgrade.GenericSecondaryWeapon secondaryWeapon = null)
 {
     SecondaryWeapon = secondaryWeapon;
 }