Added basic symbols for most of the resources and changed map to be revealed whilst robots are exploring.
This commit is contained in:
@@ -56,4 +56,17 @@ public partial class ResourceLoader
|
||||
};
|
||||
return nodes;
|
||||
}
|
||||
|
||||
public static Dictionary<string, Texture2D> LoadResourceSymbols()
|
||||
{
|
||||
Dictionary<string, Texture2D> symbols = new()
|
||||
{
|
||||
{ "Iron ore", GD.Load<Texture2D>($"res://Assets/IronSymbol.png") },
|
||||
{ "Tin ore", GD.Load<Texture2D>($"res://Assets/TinSymbol.png") },
|
||||
{ "Copper ore", GD.Load<Texture2D>($"res://Assets/CopperSymbol.png") },
|
||||
{ "Mushroom", GD.Load<Texture2D>($"res://Assets/MushroomSymbol.png") },
|
||||
{ "Spiderweb", GD.Load<Texture2D>($"res://Assets/SpiderwebSymbol.png") },
|
||||
};
|
||||
return symbols;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ public partial class UIHandler : Control
|
||||
[Export] RobotList robotList;
|
||||
[Export] Information information;
|
||||
[Export] Camera3D mainCam;
|
||||
[Export] Map map;
|
||||
public override void _Ready()
|
||||
{
|
||||
GetNode<ColorPickerButton>("./MainUI/HeaderContainer/Header/LightColor").Color = GameData.lightColor;
|
||||
@@ -21,6 +22,15 @@ public partial class UIHandler : Control
|
||||
mainCam.Position = new Vector3(robot.Position.X, mainCam.Position.Y, robot.Position.Z + 3f);
|
||||
ShowCodingWindow(robot);
|
||||
};
|
||||
|
||||
if (Input.IsActionJustPressed("map"))
|
||||
{
|
||||
map.Visible = !map.Visible;
|
||||
if (map.Visible)
|
||||
{
|
||||
map.ShowMap();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void ChangeColor(Color color)
|
||||
|
||||
Reference in New Issue
Block a user