Files
Crash-Course/Assets/Scripts/GameManager.cs

37 lines
727 B
C#
Raw Normal View History

2025-02-19 20:11:57 -05:00
using System.Collections.Generic;
2025-02-17 18:23:05 -05:00
using UnityEngine;
public class GameManager : MonoBehaviour
{
public enum GameMode
{
freeForAll,
2025-02-17 19:02:14 -05:00
keepAway,
obstacleCourse
2025-02-17 18:23:05 -05:00
}
public static GameMode gameMode = GameMode.freeForAll;
2025-02-19 20:11:57 -05:00
public static string map = "Platformer With Headroom";
public static List<GameObject> players = new List<GameObject>();
public Vector2 spawnPosition;
private void Start()
{
foreach (GameObject player in players)
{
player.transform.position = spawnPosition;
}
}
2025-02-21 17:29:28 -05:00
public void StartGame()
{
if (gameMode == GameMode.freeForAll)
{
// Start free for all game
}
}
2025-02-17 18:23:05 -05:00
}