main menu and other UI
This commit is contained in:
@@ -7,7 +7,6 @@ using TMPro;
|
||||
|
||||
public class GameManager : MonoBehaviour
|
||||
{
|
||||
|
||||
public static Action<Puck> OnSelectedPuckChanged;
|
||||
public static Action<Team> OnTeamChanged;
|
||||
public static bool isMoving{
|
||||
@@ -33,6 +32,8 @@ public class GameManager : MonoBehaviour
|
||||
[Header("UI")]
|
||||
public TMP_Text redScoreText;
|
||||
public TMP_Text blueScoreText;
|
||||
public GameObject gameOverPanel;
|
||||
public GameObject blueWon,redWon;
|
||||
|
||||
[Header("Misc")]
|
||||
public List<Puck> pucks = new List<Puck>();
|
||||
@@ -160,7 +161,7 @@ public class GameManager : MonoBehaviour
|
||||
|
||||
void Update()
|
||||
{
|
||||
m_isMoving=IsMoving();
|
||||
m_isMoving=IsMoving();
|
||||
}
|
||||
|
||||
public void OnGoal(Team team){
|
||||
@@ -174,7 +175,18 @@ public class GameManager : MonoBehaviour
|
||||
redScoreText.text = redScore.ToString();
|
||||
}
|
||||
|
||||
StartCoroutine(CoroutineOnGoal(team));
|
||||
if(blueScore >= 3){
|
||||
gameOverPanel.SetActive(true);
|
||||
|
||||
blueWon.SetActive(true);
|
||||
redWon.SetActive(false);
|
||||
}else if(redScore >= 3){
|
||||
gameOverPanel.SetActive(true);
|
||||
blueWon.SetActive(false);
|
||||
redWon.SetActive(true);
|
||||
}else{
|
||||
StartCoroutine(CoroutineOnGoal(team));
|
||||
}
|
||||
}
|
||||
|
||||
bool freezeInput = false;
|
||||
|
||||
Reference in New Issue
Block a user