|
@ -5,6 +5,7 @@ using UnityEngine.SceneManagement; |
|
|
using YamlDotNet.Serialization; |
|
|
using YamlDotNet.Serialization; |
|
|
using YamlDotNet.Serialization.NamingConventions; |
|
|
using YamlDotNet.Serialization.NamingConventions; |
|
|
using System.IO; |
|
|
using System.IO; |
|
|
|
|
|
using System.Runtime.InteropServices.WindowsRuntime; |
|
|
|
|
|
|
|
|
public class GameManager |
|
|
public class GameManager |
|
|
{ |
|
|
{ |
|
@ -16,8 +17,8 @@ public class GameManager |
|
|
int _score4 = 0; |
|
|
int _score4 = 0; |
|
|
int _highScore = 0; |
|
|
int _highScore = 0; |
|
|
int _round = 1; |
|
|
int _round = 1; |
|
|
int _numPlayers; |
|
|
|
|
|
bool _competitive = true; |
|
|
bool _competitive = true; |
|
|
|
|
|
public bool[] PlayerJoined = new bool[4]; |
|
|
|
|
|
|
|
|
public static int PLAYER_SKIN = 5; //0 == puck, 1 == pancake, 2 == gummybear, 3==pig, 4==ball w/ bear, 5==pop
|
|
|
public static int PLAYER_SKIN = 5; //0 == puck, 1 == pancake, 2 == gummybear, 3==pig, 4==ball w/ bear, 5==pop
|
|
|
public static int MAX_PLAYER_SKIN = 5; |
|
|
public static int MAX_PLAYER_SKIN = 5; |
|
@ -46,6 +47,11 @@ public class GameManager |
|
|
Score3 = 0; |
|
|
Score3 = 0; |
|
|
Score4 = 0; |
|
|
Score4 = 0; |
|
|
Round = 1; |
|
|
Round = 1; |
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < 4; i++) |
|
|
|
|
|
{ |
|
|
|
|
|
PlayerJoined[i] = false; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void RestartGame() |
|
|
public void RestartGame() |
|
@ -75,6 +81,18 @@ public class GameManager |
|
|
public int Score4 { get => _score4; set => _score4 = value; } |
|
|
public int Score4 { get => _score4; set => _score4 = value; } |
|
|
public int Round { get => _round; set => _round = value; } |
|
|
public int Round { get => _round; set => _round = value; } |
|
|
public int HighScore { get => _highScore; set => _highScore = value; } |
|
|
public int HighScore { get => _highScore; set => _highScore = value; } |
|
|
public int NumPlayers { get => _numPlayers; set => _numPlayers = value; } |
|
|
public int NumPlayers { |
|
|
|
|
|
get { |
|
|
|
|
|
int retVal = 0; |
|
|
|
|
|
foreach (bool b in PlayerJoined) |
|
|
|
|
|
{ |
|
|
|
|
|
if (b == true) |
|
|
|
|
|
{ |
|
|
|
|
|
retVal++; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
return retVal; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
public bool Competitive { get => _competitive; set => _competitive = value; } |
|
|
public bool Competitive { get => _competitive; set => _competitive = value; } |
|
|
} |
|
|
} |