Beispiel #1
0
    public void HandleOnDeadEvent(HittableType hittableType)
    {
        switch (hittableType)
        {
        case HittableType.SimpleInvader:
            Score += Constants.INVADER_BONUS_POINTS_SIMPLE;
            LiveInvadersCount--;
            break;

        case HittableType.MotherInvader:
            Score += Constants.INVADER_BONUS_POINTS_MOTHER;
            LiveInvadersCount--;
            break;

        case HittableType.ShootingInvader:
            Score += Constants.INVADER_BONUS_POINTS_SHOOTING;
            LiveInvadersCount--;
            break;

        case HittableType.Player:
            FinishGame(false);
            break;

        default:
            break;
        }

        if (LiveInvadersCount <= 0)
        {
            FinishGame(true);
        }
    }
Beispiel #2
0
 private void Inv_OnDeadEvent(HittableType obj)
 {
     gameManager.HandleOnDeadEvent(obj);
 }
Beispiel #3
0
 private void YourMother_OnDeadEvent(HittableType obj)
 {
     gameManager.HandleOnDeadEvent(obj);
 }