Exemple #1
0
 public void Update()
 {
     timeLeft -= Time.deltaTime;
     if (timeLeft < 0)
     {
         LevelChanger.FadeNextScene();
     }
 }
Exemple #2
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        boxAnimator.SetTrigger("DamageBox");
        hitpoint.SetTrigger("DamageBox");
        boxDamage++;


        if (boxDamage == 3)
        {
            boxAnimator.SetTrigger("OverBox");
            LevelChanger.FadeNextScene();
        }
    }