7-15-25@3:02am

This commit is contained in:
2025-07-15 03:02:30 -04:00
parent 5141a611fb
commit 022f0948db
6 changed files with 187 additions and 87 deletions

View File

@@ -5,11 +5,7 @@ using System.Linq;
public partial class Battle : Node
{
[Signal]
public delegate void SetCurrentEventHandler(Battle BATTLE);
//[Signal]
//public delegate void DetectMovementEventHandler(bool BOOL);
public bool _current;
public Vector2 _startPosition = new Vector2(890, 340);
public Player _player;
@@ -83,18 +79,17 @@ public partial class Battle : Node
public void PottedBall(Node2D BODY)
{
if (BODY.GetType() != typeof(Ball)){
if (BODY.GetType() != typeof(Ball))
{
return;
}
if (BODY == _player._actor._activeBall)
if (BODY == _player._actor._selectedBall)
{
GD.Print(1);
_player._actor._activeBall._potted = true;
_player._actor._activeBall._placed = false;
_player._actor._selectedBall._potted = true;
_player._actor._selectedBall._placed = false;
}
else
{
GD.Print(BODY);
Sprite2D ballSprite = new Sprite2D();
AddChild(ballSprite);
ballSprite.Texture = BODY.GetNode<Sprite2D>("Image").Texture;
@@ -110,8 +105,7 @@ public partial class Battle : Node
{
_current = true;
GenerateBalls();
EmitSignal(SignalName.SetCurrent, this);
Globals.Instance._currentBattle = this;
}
}