game: made npcs only spawn during shift
This commit is contained in:
parent
a01b6778aa
commit
8b571ecbc6
2 changed files with 7 additions and 1 deletions
|
@ -701,6 +701,7 @@ MonoBehaviour:
|
|||
m_EditorClassIdentifier:
|
||||
dayEnded: 0
|
||||
shiftStarted: 0
|
||||
currentNPC: {fileID: 0}
|
||||
frontWalkPoints:
|
||||
- {fileID: 1521924626}
|
||||
- {fileID: 2036976913}
|
||||
|
@ -858,6 +859,7 @@ MonoBehaviour:
|
|||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
shiftDuration: 20
|
||||
npcSpawnArea: {fileID: 1126609776}
|
||||
--- !u!1 &756192406
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -1016,7 +1018,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!4 &1126609777
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -14,6 +14,8 @@ public class ShiftManager : MonoBehaviour
|
|||
[SerializeField]
|
||||
private float shiftDuration;
|
||||
private float remainingTime;
|
||||
[SerializeField]
|
||||
private GameObject npcSpawnArea;
|
||||
|
||||
private Collider shiftTrigger;
|
||||
private GameManager gm;
|
||||
|
@ -34,6 +36,7 @@ public class ShiftManager : MonoBehaviour
|
|||
{
|
||||
Debug.Log("Shift started");
|
||||
|
||||
npcSpawnArea.SetActive(true);
|
||||
gm.shiftStarted = true;
|
||||
shiftTrigger.enabled = false;
|
||||
StartCoroutine(StartWorkShift());
|
||||
|
@ -62,6 +65,7 @@ public class ShiftManager : MonoBehaviour
|
|||
{
|
||||
Debug.Log("Shift ended!");
|
||||
|
||||
npcSpawnArea.SetActive(false);
|
||||
remainingTime = shiftDuration;
|
||||
gm.shiftStarted = false;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue