This commit is contained in:
2026-01-21 23:40:20 +01:00
commit d1f8068081
478 changed files with 24902 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
extends Area3D
class_name HitBox
@export var active: bool = false
var attack: Attack
func _ready() -> void:
monitorable = false
func _process(delta: float) -> void:
if !attack: return
var boxesHurt: Array[HurtBox]
for area in get_overlapping_areas():
if area is HurtBox:
boxesHurt.push_back(area)
for box in boxesHurt:
box.hit(attack)

View File

@@ -0,0 +1 @@
uid://c4bkcld6mpuj7

View File

@@ -0,0 +1,10 @@
extends Area3D
class_name HurtBox
signal hitTaken(attack: Attack)
func _ready() -> void:
monitoring = false
func hit(attack: Attack) -> void: ##Emits hitTaken signal to indicate the actor has been hit by an attack
hitTaken.emit(attack)

View File

@@ -0,0 +1 @@
uid://b7kjt28lv4p1h

View File

@@ -0,0 +1,5 @@
extends Object
class_name Attack
var damage: float = 0.0
var trauma: float = 0.0

View File

@@ -0,0 +1 @@
uid://vj6t63oapvo4