This commit is contained in:
RochesterX
2025-02-17 19:14:59 -05:00
4 changed files with 36 additions and 4 deletions

View File

@@ -5,8 +5,8 @@ public class GameManager : MonoBehaviour
public enum GameMode
{
freeForAll,
teamDeathmatch,
captureTheFlag
keepAway,
obstacleCourse
}
public static GameMode gameMode = GameMode.freeForAll;

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()
{

16
Assets/Scripts/UseItem.cs Normal file
View File

@@ -0,0 +1,16 @@
using UnityEngine;
public class UseItem : MonoBehaviour
{
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 861b3bde023ca7f48a72c48ef9ee25d2