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.")
|
||||
1
elements/entities/trap/trap.gd.uid
Normal file
1
elements/entities/trap/trap.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://c15068gqlfkly
|
||||
6
elements/entities/trap/trap.tscn
Normal file
6
elements/entities/trap/trap.tscn
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
[gd_scene format=3 uid="uid://c4wux0bxkjv7v"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c15068gqlfkly" path="res://elements/entities/trap/trap.gd" id="1_q5awx"]
|
||||
|
||||
[node name="Trap" type="Node3D" unique_id=1227817009]
|
||||
script = ExtResource("1_q5awx")
|
||||
Loading…
Add table
Add a link
Reference in a new issue