Friday, 22 August 2025 01:17:08

This commit is contained in:
2025-08-22 01:17:10 -04:00
parent 2eb95b18fd
commit 4fe431a8e0
18 changed files with 172 additions and 56 deletions

View File

@@ -27,22 +27,20 @@ public partial class Manager : Node
Worker newWorker = Globals.Instance._workerScene.Instantiate<Worker>();
newWorker.Position = Globals.Instance._screenCenter + new Vector2(0, 100);
newWorker._id = 1;
newWorker._manager = this;
AddChild(newWorker);
_workers.Add(newWorker);
newWorker = Globals.Instance._workerScene.Instantiate<Worker>();
newWorker.Position = Globals.Instance._screenCenter - new Vector2(0, 100);
newWorker._id = 2;
newWorker._manager = this;
AddChild(newWorker);
_workers.Add(newWorker);
for (int i = 0; i < _workers.Count; i++)
{
_workers[i]._healthBar.Position = _managerPanel.GetNode<Panel>("Team").GetNode<Panel>("T"+(i+1)).GlobalPosition;
}
// for (int i = 0; i < _workers.Count; i++)
// {
// _workers[i]._healthBar.Position = _managerPanel.GetNode<Panel>("Team").GetNode<Panel>("T"+(i+1)).GlobalPosition;
// }
Tchotchke newTchotchke = ResourceLoader.Load<PackedScene>("res://Gameplay/Tchotchkes/awfully_hot_coffee_pot.tscn").Instantiate<Tchotchke>();
newTchotchke.Position = new Vector2(Globals.Instance._screenSize.X - 100, Globals.Instance._screenCenter.Y);