Update Kills count & Passive heal

This commit is contained in:
alexis committed 2023-10-17 13:48:58 +02:00
1 parent 797a399977
commit d6f946acf1
2 files changed
+29 -3

No files matched your search

+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++;
}
}
}