Update Kills count & Passive heal

This commit is contained in:
2023-10-17 13:48:58 +02:00
parent 797a399977
commit d6f946acf1
2 changed files with 29 additions and 3 deletions
+12 -1
View File
@@ -28,7 +28,18 @@ public class Ennemy : MonoBehaviour
if (Life <= 0)
{
Destroy(gameObject);
_player.GetComponent<PlayerManager>().MayorKills++;
if (gameObject.name.Contains("Mayor"))
{
_player.GetComponent<PlayerManager>().MayorKills++;
}
else if (gameObject.name.Contains("Minotaur"))
{
_player.GetComponent<PlayerManager>().MinautorKills++;
}
else if(gameObject.name.Contains("Bringer of Death"))
{
_player.GetComponent<PlayerManager>().BringerOfDeathKills++;
}
}
}