예제 #1
0
 private void OnCollisionEnter2D(Collision2D collision)
 {
     Debug.Log(collision.gameObject.tag);
     if (collision.gameObject.tag == "Player")
     {
         PlayerStatsHandler.Kill();
     }
 }
예제 #2
0
    // 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;
        }
    }
예제 #3
0
 public void No()
 {
     PlayerStatsHandler.Kill();
 }