private void OnCollisionEnter2D(Collision2D collision) { Debug.Log(collision.gameObject.tag); if (collision.gameObject.tag == "Player") { PlayerStatsHandler.Kill(); } }
// Update is called once per frame void Update() { slider.value = CalculateSliderValue(); if (TimeRemaining <= 0) { TimeRemaining = 0; PlayerStatsHandler.Kill(); } else if (TimeRemaining > 0) { TimeRemaining -= Time.deltaTime; } }
public void No() { PlayerStatsHandler.Kill(); }