// 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; }
// Start is called before the first frame update private void Start() { gameEndController = FindObjectOfType <GameEndController>(); tooltip = GetComponent <TextMeshProUGUI>(); tooltip.text = gameEndController.GetRandomMinigameTooltip(); }
// Use this for initialization void Awake() { game = GameObject.FindGameObjectWithTag("Game").GetComponent <Game>(); gameEndController = GameObject.FindGameObjectWithTag("GameEndPanel").GetComponent <GameEndController>(); _questionPanel = GameObject.FindGameObjectWithTag("Question"); }
// Start is called before the first frame update private void Start() { gameEndController = FindObjectOfType <GameEndController>(); slider = GetComponent <Slider>(); }
private void Start() { swipeControlls = GetComponent <SwipeControlls>(); gameEndController = GetComponent <GameEndController>(); }