determines actions done when game is finished @Author: Edgar Onukwugha @Date: 12/16/2013 @Usage: place on "$GameController" game object
Inheritance: MonoBehaviour
Exemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        gec = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<GameEndController>();

        //initialize timer
        timer = 0;

        //initialize finish time
        finishTime = 0;

        //initialize hours
        hours = 0;

        //clamp seconds, minutes
        minutes = Mathf.Clamp(minutes, 0, 59);
        seconds = Mathf.Clamp(seconds, 0, 59);

        if (PlayerPrefs.GetFloat("bestTime") != null)
        {
            bestFinishTime = PlayerPrefs.GetFloat("bestTime");
        }
        else {
            PlayerPrefs.SetFloat("bestTime", bestFinishTime);
            bestFinishTime = 0;
        }

        updateTimer = true;
    }
Exemplo n.º 2
0
 // Start is called before the first frame update
 private void Start()
 {
     gameEndController = FindObjectOfType <GameEndController>();
     tooltip           = GetComponent <TextMeshProUGUI>();
     tooltip.text      = gameEndController.GetRandomMinigameTooltip();
 }
Exemplo n.º 3
0
    // Use this for initialization

    void Awake()
    {
        game = GameObject.FindGameObjectWithTag("Game").GetComponent <Game>();
        gameEndController = GameObject.FindGameObjectWithTag("GameEndPanel").GetComponent <GameEndController>();
        _questionPanel    = GameObject.FindGameObjectWithTag("Question");
    }
Exemplo n.º 4
0
 // Start is called before the first frame update
 private void Start()
 {
     gameEndController = FindObjectOfType <GameEndController>();
     slider            = GetComponent <Slider>();
 }
Exemplo n.º 5
0
 private void Start()
 {
     swipeControlls    = GetComponent <SwipeControlls>();
     gameEndController = GetComponent <GameEndController>();
 }