Exemplo n.º 1
0
    private void HandleBossDied(GenericBossBehaviour gbb)
    {
        Vector3     deathPos = gbb.gameObject.transform.position;
        HitParticle hitPart  = Instantiate(bossDieParticle, deathPos, Quaternion.identity);

        hitPart.transform.position = deathPos;
        hitPart.OnCleanMe          = () =>
        {
            Destroy(hitPart.gameObject);
        };

        //play a sound
        audioSource.clip = hitSound;
        audioSource.Play();
    }
Exemplo n.º 2
0
 public static void DefeatBoss(GenericBossBehaviour genericBossBehaviour)
 {
     OnBossDefeated?.Invoke(genericBossBehaviour);
 }
Exemplo n.º 3
0
 private void HandleSpawnBoss(int levelEventId, BossSpawnData bossData)
 {
     currentBoss = Instantiate(bossData.BossPrefab, new Vector3(0f, 14f, 0), Quaternion.identity);
     bossEventID = levelEventId;
 }
Exemplo n.º 4
0
 private void HandleCleanUpBoss(GenericBossBehaviour genericBossBehaviour)
 {
     Destroy(currentBoss.gameObject);
     BusSystem.LevelEvents.LevelEventFinished(bossEventID);
 }
Exemplo n.º 5
0
 private void Awake()
 {
     genericBossBehaviour = GetComponent <GenericBossBehaviour>();
 }