Пример #1
0
    public void onTileUp(float timeToFall)
    {
        timeLeftOnTile = timeToFall;

        if (!GetComponent <Animator> ().enabled)
        {
            GetComponent <Animator> ().enabled = true;
        }
        else
        {
            GetComponent <Animator> ().SetBool("goUp", true);
        }

        EvtManager.onTileUp(this.name);
    }
Пример #2
0
    // Update is called once per frame
    void Update()
    {
        if (gameInstance.isStarted)
        {
            timeLeft -= Time.deltaTime;

            a = (int)Mathf.Round(timeLeft / 60);
            b = (int)Mathf.Round(timeLeft % 60);

            GoTimeLeft.text = a.ToString() + ":" + b.ToString();

            if (timeLeft < 0)
            {
                EvtManager.onGameFinish();
            }
        }
    }
Пример #3
0
 public void onTileDown()
 {
     timeLeftOnTile = 0;
     GetComponent <Animator>().SetBool("goUp", false);
     EvtManager.onTileDown(this.name);
 }
Пример #4
0
 public void onTileWarn()
 {
     EvtManager.onTileWarn(this.name);
 }