Meeting updates

This commit is contained in:
RochesterX
2025-03-17 19:59:41 -04:00
parent 8a510c32d5
commit a3e2c9c6e2
8 changed files with 1676 additions and 1667 deletions

View File

@@ -45,10 +45,10 @@ public class GameManager : MonoBehaviour
print("Starting game with mode: " + gameMode + " and map: " + map);
if (gameMode == GameMode.freeForAll)
{
currentLives = maxLives;
foreach (GameObject player in players)
{
player.transform.position = spawnPosition + (players.IndexOf(player) * Vector2.right * offset);
player.GetComponent<Damageable>().lives = 5;
}
}
if (gameMode == GameMode.keepAway)
@@ -57,6 +57,7 @@ public class GameManager : MonoBehaviour
foreach (GameObject player in players)
{
player.transform.position = spawnPosition;
player.GetComponent<Damageable>().lives = 0;
}
}
if (gameMode == GameMode.obstacleCourse)
@@ -79,6 +80,7 @@ public class GameManager : MonoBehaviour
public static GameMode gameMode = GameMode.freeForAll; // loads a default gamemode as a safety net
public static string map = "Platformer With Headroom"; // loads a default map as a safety net
public Vector2 spawnPosition;
public Vector2 hatSpawnPosition;
public void PlayerDied(Damageable player)
{
@@ -100,7 +102,7 @@ public class GameManager : MonoBehaviour
}
if (gameMode == GameMode.keepAway)
{
RespawnPlayer(player.gameObject);
}
if (gameMode == GameMode.obstacleCourse)
{

View File

@@ -37,6 +37,7 @@ public class UseItem : MonoBehaviour
{
heldItem.GetComponent<Collider2D>().enabled = true;
heldItem.GetComponent<Rigidbody2D>().bodyType = RigidbodyType2D.Dynamic;
heldItem.transform.position += Vector3.up * 3f;
heldItem = null;
isHoldingItem = false;
}