From 26132848c2fe4d641fa4ddedbc062ac732be6435 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sun, 28 Apr 2024 11:09:31 +0200 Subject: [PATCH] Change the type of `current_monster` to `PhysicsBody2D` --- entities/sacrifice_stone.gd | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/entities/sacrifice_stone.gd b/entities/sacrifice_stone.gd index e048e15..57f851f 100644 --- a/entities/sacrifice_stone.gd +++ b/entities/sacrifice_stone.gd @@ -2,14 +2,14 @@ extends Node2D class_name SacrificeStone -signal sacrifice_changed(entity: Node2D, type: Enums.MonsterType) +signal sacrifice_changed(entity: PhysicsBody2D, type: Enums.MonsterType) -var current_monster: Node2D +var current_monster: PhysicsBody2D var current_type: Enums.MonsterType = Enums.MonsterType.None -func _on_tracked(body: Node2D): +func _on_tracked(body: PhysicsBody2D): if current_monster != null: Log.w(self, "Captured two entities") return @@ -24,7 +24,7 @@ func _on_tracked(body: Node2D): if current_monster == null: Log.w(self, "Captured entity with no MonsterType") -func _on_untracked(body: Node2D): +func _on_untracked(body: PhysicsBody2D): if body == current_monster: current_monster = null current_type = Enums.MonsterType.None