public void DmgCollision(float damage) { StatModifier collisionDmg = new StatModifier(damage, StatModType.Flat); health.AddModifier(collisionDmg); if (health.Value <= 0) { PlayerSkills ps = (PlayerSkills)player.GetComponent(typeof(PlayerSkills)); ps.GainXP(xp); if (boss != "") { Debug.Log("Pronto passaste, toma lá os ECTs..."); player.GetComponent <PlayerStats>().CompleteUC(boss); GameObject.Find("GameManager").GetComponent <GameManager>().BossResult("Won"); if (boss == "ALGE") { GameObject.Find("door9").GetComponent <AudioSource>().Stop(); } else if (boss == "FPRO") { GameObject.Find("door11").GetComponent <AudioSource>().Stop(); } GameObject.Find("Teleporter").GetComponent <Teleporter>().Leave(); } Destroy(gameObject); } }