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); }
// 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(); } } }
public void onTileDown() { timeLeftOnTile = 0; GetComponent <Animator>().SetBool("goUp", false); EvtManager.onTileDown(this.name); }
public void onTileWarn() { EvtManager.onTileWarn(this.name); }