Example #1
0
 private void OnUfoProjectileDestroyed(object sender, OnProjectileDestroyedArgs args)
 {
     if (args.tagOfObjectHit.Equals(playerShip.gameObject.tag))
     {
         StartCoroutine(DisableShipAfterTimer());
     }
 }
Example #2
0
    private void UpdateScoreAndCheckForExtraLives(object sender, OnProjectileDestroyedArgs args)
    {
        //alternative would be to get an Object reference and get POINTs directly from it ??
        switch (args.tagOfObjectHit)
        {
        case GameConfig.LargeAsteroidTag:
            AddPointsToScore(GameConfig.LargeAsteroidPointsValue);
            break;

        case GameConfig.MediumAsteroidTag:
            AddPointsToScore(GameConfig.MediumAsteroidPointsValue);
            break;

        case GameConfig.SmallAsteroidTag:
            AddPointsToScore(GameConfig.SmallAsteroidPointsValue);
            break;

        case GameConfig.UfoTag:
            AddPointsToScore(GameConfig.UfoPointsValue);
            break;
        }
    }