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,18 @@
class_name Explosion
extends Node2D
const destructable_tiles := {Vector2i(4, 0): Rect2(32, 160, 16, 16), Vector2i(4, 2): Rect2(48, 160, 16, 16)}
const BLOCK_DESTRUCTION_PARTICLES = preload("uid://cyw7kk1em8h16")
func on_body_entered(body: Node2D) -> void:
if body is Block:
if body.destructable: body.destroy()
if body is Player:
body.damage()
func on_area_entered(area: Area2D) -> void:
if area.owner is Player:
area.owner.damage()