boss start, some enemies

This commit is contained in:
Daniel Kauss Serna 2026-04-16 18:53:36 +02:00
parent 93968ff9fb
commit 66ecb04bd1
123 changed files with 1884 additions and 499 deletions

View file

@ -2,9 +2,11 @@ class_name Hitbox extends Area2D
signal hit_entity(entity : Entity);
signal hit_obstacle;
var from_player = true
var enabled = true
@export var deal_damage = true
@export var dmg = 1
func _ready() -> void:
collision_mask = 1 | 2 | 4
@ -20,14 +22,14 @@ func _on_body_entered(body: Node) -> void:
if not enabled: return
if body is Enemy and from_player:
if deal_damage:
body.damage()
body.damage(dmg)
body.knockback()
hit_entity.emit(body)
if body is Player and not from_player:
if deal_damage:
body.damage()
body.damage(dmg)
hit_entity.emit(body)