main menu and other UI

This commit is contained in:
2026-01-29 16:31:39 +05:30
parent 17b8f48e8f
commit 06a2148532
7437 changed files with 3983588 additions and 16 deletions

View File

@@ -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;