Fixed robot naming on spawn
This commit is contained in:
@@ -98,10 +98,10 @@ public partial class RobotList : PanelContainer
|
||||
|
||||
GameData.inventory.RemoveItem(spawnId, 1);
|
||||
Robot robot = ResourceLoader.LoadRobotPrefab().Instantiate<Robot>();
|
||||
robot.Name = $"Robot #{GameData.robots.Count}";
|
||||
robot.Position = GameData.map[0].tiles[0, 0].Position;
|
||||
robot.robotType = spawnId;
|
||||
GetNode("/root/Main/World").AddChild(robot);
|
||||
robot.Name = $"Robot #{GameData.robots.Count}";
|
||||
GameData.robots.Add(robot);
|
||||
spawnId = "";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user