8-4-25 @ 2:42 am

This commit is contained in:
2025-08-04 02:42:51 -04:00
parent 50e4f8fcb5
commit 7f65338679
15 changed files with 357 additions and 250 deletions

View File

@@ -5,7 +5,6 @@ using System.Linq;
public partial class ComputerManager : Manager
{
public int _id = 1;
public List<Vector2I> _initialRackPositions =
[
new Vector2I(2, 3),
@@ -19,28 +18,31 @@ public partial class ComputerManager : Manager
];
public override void _Ready()
{
base._Ready();
Ball newBall;
BallSprite newBallSprite;
for (int i = 8; i <= 15; i++)
for (int i = 0; i < 8; i++)
{
newBall = _ballScene.Instantiate<Ball>();
newBall.SetSprite("res://art/ball_" + i + ".png");
newBall._rackPosition = _initialRackPositions[i - 8];
newBall._ownerId = _id;
newBall.SetSprite("res://art/ball_" + (i+8) + ".png");
newBall._rackPosition = _initialRackPositions[i];
newBall._owner = this;
_balls.Add(newBall);
newBallSprite = _ballSpriteScene.Instantiate<BallSprite>();
newBallSprite.SetSprite("res://art/ball_" + i + ".png");
newBallSprite._rackPosition = _initialRackPositions[i - 8];
newBallSprite._ownerId = _id;
newBallSprite.SetSprite(newBall._imagePath);
newBallSprite._rackPosition = _initialRackPositions[i];
newBallSprite._owner = this;
_ballSprites.Add(newBallSprite);
}
}
public override void Start()
{
}
}