Interactable Chest Collision

This commit is contained in:
Marco 2025-01-29 14:54:01 +01:00
commit 686dea6c8d
8 changed files with 95 additions and 22 deletions

View file

@ -88,8 +88,8 @@ public partial class PlayerMovement : CharacterBody2D, IDestructible
if (SelectorScene != null)
{
_selector = this.CreateChild<Node2D>(SelectorScene);
_selector.Visible = false;
_selector = this.CreateSibling<Node2D>(SelectorScene, this.GlobalPosition);
_selector.Visible = true;
}
}
@ -257,7 +257,7 @@ public partial class PlayerMovement : CharacterBody2D, IDestructible
// Replace with function body.
if (area.IsInGroup("Interactable") && area is Interactable interactable)
{
Debug.WriteLine("Interactable Entered");
Debug.WriteLine($"Interactable {area.Name} Entered");
if (_selector != null)
{
@ -268,6 +268,11 @@ public partial class PlayerMovement : CharacterBody2D, IDestructible
}
}
private void _on_interaction_controller_area_exited(Area2D area)
{
}
private void Explode()
{
Debug.WriteLine("Ded");