mirror of
https://github.com/boudji-ludwig-pett/cnam-geometry-dash.git
synced 2024-12-18 21:44:51 +01:00
28 lines
541 B
C#
28 lines
541 B
C#
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using UnityEngine.SceneManagement;
|
|
|
|
public class LogicManagerScript : MonoBehaviour
|
|
{
|
|
public uint score = 0;
|
|
public Text scoreText;
|
|
public GameObject gameOverScreen;
|
|
|
|
[ContextMenu("AddScore")]
|
|
public void AddScore()
|
|
{
|
|
score += 1;
|
|
scoreText.text = score.ToString();
|
|
}
|
|
|
|
public void Restart()
|
|
{
|
|
SceneManager.LoadScene(SceneManager.GetActiveScene().name);
|
|
}
|
|
|
|
public void GameOver()
|
|
{
|
|
gameOverScreen.SetActive(true);
|
|
}
|
|
}
|