-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix end screen displaying for only one player
- Loading branch information
Showing
6 changed files
with
73 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
using TMPro; | ||
|
||
public class EndController : MonoBehaviour | ||
{ | ||
public GameObject endScreen; | ||
|
||
void Awake() | ||
{ | ||
if(endScreen == null) | ||
{ | ||
endScreen = GameObject.Find("EndScreen"); | ||
} | ||
endScreen.SetActive(false); | ||
} | ||
|
||
public void OnGameEnd(char winner) | ||
{ | ||
endScreen.SetActive(true); | ||
endScreen.transform.Find("Winner").GetComponent<TextMeshProUGUI>().text = winner == 'R' ? "Red Team" : "Blue Team"; | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 9 additions & 61 deletions
70
Assets/TextMesh Pro/Examples & Extras/Resources/Fonts & Materials/Roboto-Bold SDF.asset
Large diffs are not rendered by default.
Oops, something went wrong.
70 changes: 9 additions & 61 deletions
70
Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset
Large diffs are not rendered by default.
Oops, something went wrong.