playerlives

more additions
This commit is contained in:
djkellerman
2025-02-17 19:02:14 -05:00
parent a3ce16bd3a
commit 136c8d3d89
4 changed files with 36 additions and 4 deletions

View File

@@ -1,3 +1,4 @@
using Unity.VisualScripting;
using UnityEngine;
public class PlayerLives : MonoBehaviour
@@ -11,10 +12,15 @@ public class PlayerLives : MonoBehaviour
{
currentLives = maxLives;
}
else //add more gamemodes and their lives here
if (GameManager.gameMode == GameManager.GameMode.keepAway)
{
currentLives = 0;
currentLives = 1;
}
if (GameManager.gameMode == GameManager.GameMode.obstacleCourse)
{
currentLives = 1;
}
//add more gamemodes and their lives here
}
public void PlayerDied()
{
@@ -30,6 +36,14 @@ public class PlayerLives : MonoBehaviour
RespawnPlayer();
}
}
if (GameManager.gameMode == GameManager.GameMode.keepAway)
{
}
if (GameManager.gameMode == GameManager.GameMode.obstacleCourse)
{
}
}
private void RespawnPlayer()
{