Added resources to the game and prepared scripts for later usage
This commit is contained in:
@@ -6,7 +6,6 @@ using static GameData;
|
||||
|
||||
public partial class World : Node3D
|
||||
{
|
||||
Random rand = new Random();
|
||||
public Dictionary<string, MeshInstance3D> tileMeshes;
|
||||
public Dictionary<string, MeshInstance3D> contentMeshes;
|
||||
public Dictionary<string, List<Placeholder>> tilePlaceholders;
|
||||
@@ -179,6 +178,8 @@ public partial class World : Node3D
|
||||
posY = rand.Next(layerSize);
|
||||
if (layer.tiles[posX, posY].containsResource) continue;
|
||||
layer.tiles[posX, posY].containsResource = true;
|
||||
layer.tiles[posX, posY].resource = new GameResource(ResourceDistributor.GetResource(layer.currentResources));
|
||||
layer.currentResources.Add(layer.tiles[posX, posY].resource.name);
|
||||
currentResource++;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user