diff --git a/Assets/Scripts/GameManager.cs b/Assets/Scripts/GameManager.cs index 619dc7f..acfc17f 100644 --- a/Assets/Scripts/GameManager.cs +++ b/Assets/Scripts/GameManager.cs @@ -3,6 +3,26 @@ using UnityEngine; public class GameManager : MonoBehaviour { +<<<<<<< Updated upstream +======= + + public void StartGame() + { + if (gameMode == GameMode.freeForAll) + { + StartFreeForAll(); + } + if (gameMode == GameMode.keepAway) + { + StartKeepAway(); + } + if (gameMode == GameMode.obstacleCourse) + { + StartObstacleCourse(); + } + } + +>>>>>>> Stashed changes public enum GameMode { freeForAll, @@ -12,13 +32,13 @@ public class GameManager : MonoBehaviour public static GameMode gameMode = GameMode.freeForAll; - public static string map = "Platformer With Headroom"; + public static string map = "Platformer With Headroom"; //is called for in playermanager but should probably be removed. public static List players = new List(); public Vector2 spawnPosition; - private void Start() + private void StartFreeForAll() { foreach (GameObject player in players) { @@ -26,6 +46,7 @@ public class GameManager : MonoBehaviour } } +<<<<<<< Updated upstream public void StartGame() { if (gameMode == GameMode.freeForAll) @@ -33,4 +54,25 @@ public class GameManager : MonoBehaviour // Start free for all game } } +======= + private void StartKeepAway() + { + foreach (GameObject player in players) + { + player.transform.position = spawnPosition; + } + } + private void StartObstacleCourse() + { + foreach (GameObject player in players) + { + player.transform.position = spawnPosition; + } + } + + private void Start() + { + StartGame(); + } +>>>>>>> Stashed changes }