added the game

This commit is contained in:
JHDev2006
2025-09-13 16:30:32 +01:00
parent 5ef689109b
commit 3773bdaf64
3616 changed files with 263702 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
extends Node2D
const COIN_SPARKLE = preload("res://Scenes/Prefabs/Particles/CoinSparkle.tscn")
var velocity := Vector2(0, -300)
func _ready() -> void:
Global.coins += 1
Global.score += 200
AudioManager.play_sfx("coin", global_position)
func _physics_process(delta: float) -> void:
global_position += velocity * delta
velocity.y += (15 / delta) * delta
func vanish() -> void:
queue_free()
func summon_particle() -> void:
var node = COIN_SPARKLE.instantiate()
node.global_position = global_position
add_sibling(node)