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:
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user