using Godot; using System; using System.Collections.Generic; using System.Linq; public partial class ComputerManager : Manager { public int _id = 1; public List _initialRackPositions = [ new Vector2I(2, 3), new Vector2I(2, 1), new Vector2I(5, 1), new Vector2I(1, 2), new Vector2I(3, 2), new Vector2I(3, 3), new Vector2I(1, 4), new Vector2I(1, 5) ]; public override void _Ready() { Ball newBall; BallSprite newBallSprite; for (int i = 8; i <= 15; i++) { newBall = _ballScene.Instantiate(); newBall.SetSprite("res://art/ball_" + i + ".png"); newBall._rackPosition = _initialRackPositions[i - 8]; newBall._ownerId = _id; _balls.Add(newBall); newBallSprite = _ballSpriteScene.Instantiate(); newBallSprite.SetSprite("res://art/ball_" + i + ".png"); newBallSprite._rackPosition = _initialRackPositions[i - 8]; newBallSprite._ownerId = _id; _ballSprites.Add(newBallSprite); } } public override void Start() { } }