Thursday, 07 August 2025 19:00:19

This commit is contained in:
2025-08-07 19:00:24 -04:00
parent 33db2a63a2
commit 4fe9a333d7
6 changed files with 223 additions and 158 deletions

View File

@@ -8,6 +8,7 @@ public partial class Table : Sprite2D
{
[Signal]
public delegate void OnBallPottedEventHandler(Ball THIS, Pocket POCKET);
public bool _kitchenHovered;
List<Pocket> _pockets;
public override void _Ready()
@@ -21,6 +22,9 @@ public partial class Table : Sprite2D
{
_pockets[i].OnBallPotted += BallPotted;
}
GetNode<Area2D>("Kitchen").MouseEntered += KitchenHovered;
GetNode<Area2D>("Kitchen").MouseExited += KitchenUnhovered;
}
public void BallPotted(Node NODE, Pocket POCKET)
@@ -30,4 +34,14 @@ public partial class Table : Sprite2D
EmitSignal(SignalName.OnBallPotted, (Ball)NODE, POCKET);
}
}
public void KitchenHovered()
{
_kitchenHovered = true;
}
public void KitchenUnhovered()
{
_kitchenHovered = false;
}
}