public static void DeathStart() { //Time.timeScale = 0; UserinterfaceController yo = new UserinterfaceController(); yo.DeathSecond(); }
void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.tag == "Enemy") { UserinterfaceController.DeathStart(); } else if (collision.gameObject.tag == "Coins") { scoringController.UpdateScoreOnCoin(_coinScore); Destroy(collision.gameObject); } }