State machine, player anis, bullet pool and graphics

This commit is contained in:
ArunKirupananthan committed 2026-10-13 20:59:26 -04:00
1 parent 4e9a117b77
commit ea9d513ff8
16 files changed
+480 -18

No files matched your search

+6 -3
View File
@@ -1,6 +1,9 @@
class_name GameController extends Node2D
signal teleportSignal(body:RigidBody2D)
signal destroySignal(Body)
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
@@ -16,7 +19,7 @@ func _on_trigger(effect: Variant, Object: Variant) -> void:
match effect:
"destroy":
if not Object is Player:
Object.queue_free()
destroySignal.emit(Object)
"teleport":
print("Trigger wants to teleport")
if Object is Crate :
@@ -25,6 +28,6 @@ func _on_trigger(effect: Variant, Object: Variant) -> void:
func _on_bullet_hit(body,bullet)-> void:
print ("GC knows bullet hit")
if body is Crate:
body.queue_free()
bullet.queue_free()
destroySignal.emit(body)
destroySignal.emit(bullet)