예제 #1
0
 void Start()
 {
     p = GameObject.Find("Canvas").GetComponent <Transform>();
     Input.multiTouchEnabled = false;
     times = GetComponent <LoseTimer>();
     life  = 3;
 }
예제 #2
0
 protected void OnRemainingTimeChangedEvent(LoseTimer sender)
 {
     if (RemainingTime <= 5f && RemainingTime > 0f && !sndCountdown.IsPlaying)
     {
         sndCountdown.Play();
     }
     else if (RemainingTime > 5f && sndCountdown.IsPlaying)
     {
         sndCountdown.Stop();
     }
 }
예제 #3
0
	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());
		}
	}
예제 #4
0
    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());
        }
    }
예제 #5
0
	protected void OnRemainingTimeChangedEvent(LoseTimer sender)
	{
		if (RemainingTime <= 5f && RemainingTime > 0f && !sndCountdown.IsPlaying) {
			sndCountdown.Play();
		} 
		else if (RemainingTime > 5f && sndCountdown.IsPlaying) {
			sndCountdown.Stop();
		}
	}