Datamanger in use
This commit is contained in:
parent
563bdf456a
commit
09a86e504f
@ -989,8 +989,9 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 673a21955a819d748b7b528d00a157e2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
ScoreText: {fileID: 0}
|
||||
ScoreText: {fileID: 1149440332}
|
||||
name: {fileID: 1711357578}
|
||||
score: {fileID: 0}
|
||||
--- !u!114 &989324638
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -2064,6 +2064,7 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
ScoreText: {fileID: 748254063}
|
||||
name: {fileID: 0}
|
||||
score: {fileID: 0}
|
||||
--- !u!114 &989324638
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -3082,7 +3083,7 @@ MonoBehaviour:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
- m_Target: {fileID: 989324637}
|
||||
m_MethodName: Credits
|
||||
m_MethodName: Score
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
|
@ -914,8 +914,9 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 673a21955a819d748b7b528d00a157e2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
ScoreText: {fileID: 0}
|
||||
ScoreText: {fileID: 1149440332}
|
||||
name: {fileID: 0}
|
||||
score: {fileID: 0}
|
||||
--- !u!114 &989324638
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -11,6 +11,8 @@ public class MainMenu : MonoBehaviour
|
||||
{
|
||||
public TMPro.TextMeshProUGUI ScoreText;
|
||||
public InputField name;
|
||||
public TMPro.TextMeshProUGUI score;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
@ -19,7 +21,8 @@ public class MainMenu : MonoBehaviour
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
if (score != null)
|
||||
score.text = "Score: " + DataManager.Score().ToString();
|
||||
}
|
||||
|
||||
public void PlayGame()
|
||||
@ -27,10 +30,19 @@ public class MainMenu : MonoBehaviour
|
||||
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
|
||||
}
|
||||
|
||||
public void Credits()
|
||||
public void Score()
|
||||
{
|
||||
StartCoroutine(GetText("dev.steelants.cz/GGJ2021/GeorgeJones/Server/api.php"));
|
||||
ScoreText.text = "test";
|
||||
}
|
||||
|
||||
public void BackToMainMenu()
|
||||
{
|
||||
SceneManager.LoadScene(0);
|
||||
}
|
||||
|
||||
public void RestartLevel()
|
||||
{
|
||||
SceneManager.LoadScene(DataManager.Level());
|
||||
}
|
||||
|
||||
public void QuitGame()
|
||||
|
Loading…
Reference in New Issue
Block a user