7-19-25 @ 1:16 AM

This commit is contained in:
2025-07-19 01:16:38 -04:00
parent 3884c07811
commit ea03cc152a
7 changed files with 137 additions and 59 deletions

View File

@@ -4,7 +4,7 @@ using System.Data;
public partial class Ball : RigidBody2D
{
public bool _placed = false, _potted = false, _available = false, _hovered = false, _selected = false, _aimed = false, _moving = false;
public bool _placed = false, _potted = false, _available = false, _hovered = false, _selected = false, _aimed = false, _moving = false, _isCue = false;
public int _defense, _defenseMax;
public float _moveThreshold = 5.0f;
@@ -16,10 +16,12 @@ public partial class Ball : RigidBody2D
if (NUMBER == 0)
{
fileName = "res://art/cue_ball.png";
newBall._isCue = true;
}
else
{
fileName = "res://art/ball_"+NUMBER+".png";
fileName = "res://art/ball_" + NUMBER + ".png";
newBall._isCue = false; ;
}
Texture2D image = GD.Load<Texture2D>(fileName);
newBall.GetNode<Sprite2D>("Image").Texture = image;