Started working on building, next to add in spawn location for buildings for units, transporting materials from TownHall/Storage to building site, building naimation continues while building, houses spawn the correct amount of units (not just 1)

This commit is contained in:
2026-06-12 13:58:02 +01:00
parent bd3bb4bc6f
commit d99b2197e5
11 changed files with 469 additions and 10 deletions

View File

@@ -2,10 +2,16 @@ using UnityEngine;
public class JobManager : MonoBehaviour
{
public static JobManager Instance;
private Building targetBuilding;
private Resource targetResource;
private NPC targetNPC;
public void RequestJob(NPC.Job jobType)
void Awake()
{
Instance = this;
}
public Building RequestJob(NPC.Job jobType)
{
switch (jobType)
{
@@ -13,10 +19,11 @@ public class JobManager : MonoBehaviour
targetBuilding = GetUnfinishedBuildings();
if(targetBuilding != null)
{
targetBuilding.StartBuilding();
return targetBuilding;
}
break;
}
}
return null;
}
private Building GetUnfinishedBuildings()
{