initial commit
This commit is contained in:
commit
c2bb3893a9
1038 changed files with 75846 additions and 0 deletions
12
elements/entities/trap/trap.gd
Normal file
12
elements/entities/trap/trap.gd
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
extends Node3D
|
||||
|
||||
signal trap_triggered(damage: int)
|
||||
|
||||
@export var damage: int = 1
|
||||
|
||||
func _ready() -> void:
|
||||
add_to_group("steppable")
|
||||
|
||||
func stepped_on() -> void:
|
||||
trap_triggered.emit(damage)
|
||||
print("Trap triggered! Dealing ", damage, " damage to the player.")
|
||||
Loading…
Add table
Add a link
Reference in a new issue