void Start() { p = GameObject.Find("Canvas").GetComponent <Transform>(); Input.multiTouchEnabled = false; times = GetComponent <LoseTimer>(); life = 3; }
protected void OnRemainingTimeChangedEvent(LoseTimer sender) { if (RemainingTime <= 5f && RemainingTime > 0f && !sndCountdown.IsPlaying) { sndCountdown.Play(); } else if (RemainingTime > 5f && sndCountdown.IsPlaying) { sndCountdown.Stop(); } }
void Start () { label = GetComponent<UILabel>(); loseIsMoves = (gameLogic.loseConditions is LoseMoves); loseMoves = (gameLogic.loseConditions as LoseMoves); loseTimer = (gameLogic.loseConditions as LoseTimer); if (index == 1) { secondsLabel.gameObject.SetActive(gameLogic.loseConditions is LoseTimer); } UpdateText(); if (index == 1) { label.text = ScoreSystem.FormatScore(currentValue); StartCoroutine(ValueUpdater()); } }
void Start() { label = GetComponent <UILabel>(); loseIsMoves = (gameLogic.loseConditions is LoseMoves); loseMoves = (gameLogic.loseConditions as LoseMoves); loseTimer = (gameLogic.loseConditions as LoseTimer); if (index == 1) { secondsLabel.gameObject.SetActive(gameLogic.loseConditions is LoseTimer); } UpdateText(); if (index == 1) { label.text = ScoreSystem.FormatScore(currentValue); StartCoroutine(ValueUpdater()); } }