Week1 four big game objects, gamecontroller, custom signal
This commit is contained in:
commit
c8d5474785
13 files changed
+230
No files matched your search
@@ -0,0 +1,17 @@
|
||||
extends Area2D
|
||||
|
||||
var effect="destroy"
|
||||
signal areaTriggered(effect, Object)
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
pass
|
||||
|
||||
|
||||
func _on_body_entered(body: Node2D) -> void:
|
||||
print("Trigger was triggered")
|
||||
areaTriggered.emit(effect, body)
|
||||
Reference in new issue
Block a user