added sprites for grenade and bullet; tilemap with collisions; explosion effect

This commit is contained in:
torontocaper committed 2025-10-24 21:57:19 -04:00
1 parent ec743da5ba
commit 1c2cb39425
13 files changed
+603 -64

No files matched your search

+6
View File
@@ -3,6 +3,9 @@ extends RigidBody2D
var timer = Timer.new()
@onready var animated_sprite_2d: AnimatedSprite2D = $AnimatedSprite2D
@onready var sprite_2d: Sprite2D = $Sprite2D
func _ready() -> void:
add_child(timer)
timer.wait_time = 2.0
@@ -12,6 +15,9 @@ func _ready() -> void:
func explode() -> void:
print("kaboom!")
sprite_2d.visible = false
animated_sprite_2d.play("explode")
await animated_sprite_2d.animation_finished
self.queue_free()
func _on_body_entered(body: Node) -> void: