Пример #1
0
    public override void EnemyDestroyed(Vector3 aPosition, int pointsValue, int hitByID)
    {
        // tell our sound controller to play an explosion sound
        BaseSoundController.Instance.PlaySoundByIndex(1, aPosition);

        // tell main data manager to add score
        mainPlayerDataManager1.AddScore(pointsValue);

        // update the score on the UI
        UpdateScoreP1(mainPlayerDataManager1.GetScore());

        // play an explosion effect at the enemy position
        Explode(aPosition);

        // tell spawn controller that we're one enemy closer to the next wave
        spawnManager.DecriseCountSpawnedObject();
        spawnManager.SpawnRandomObjectWithLimit();
    }