using Godot; using System; using System.Collections.Generic; using System.Linq; public partial class ComputerManager : Manager { 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() { base._Ready(); Ball newBall; BallSprite newBallSprite; for (int i = 0; i < 8; i++) { newBall = _ballScene.Instantiate(); newBall.SetSprite("res://art/ball_" + (i+8) + ".png"); newBall._rackPosition = _initialRackPositions[i]; newBall._owner = this; _balls.Add(newBall); newBallSprite = _ballSpriteScene.Instantiate(); newBallSprite.SetSprite(newBall._imagePath); newBallSprite._rackPosition = _initialRackPositions[i]; newBallSprite._owner = this; _ballSprites.Add(newBallSprite); } } public override void Start() { } }