Made winning reset tree counter; Dry leaf duration 2 -> 1

This commit is contained in:
go38coz
2026-06-07 07:54:04 +02:00
parent 9e486595f2
commit 63c8ac4ec0
6 changed files with 9 additions and 1234 deletions
+4 -3
View File
@@ -75,11 +75,12 @@ public class DamageHandler : MonoBehaviour
}
private void OnCollisionEnter2D(Collision2D other)
{
if(other.collider.CompareTag("Finish")){
{
if(other.collider.CompareTag("Finish")){ //WIN THE GAME
TreeSpawner.treeCount = 0;
SceneManager.LoadScene(5, LoadSceneMode.Single);
}
float fallSpeed = lastYVelocity;
float fallSpeed = lastYVelocity;
// Check if we hit hard enough
if (fallSpeed < -threshold)