game: seats add

This commit is contained in:
kookiekenobi 2025-02-15 22:13:37 +08:00
parent 82f4ed859f
commit 66b36104b2
5 changed files with 118 additions and 1083 deletions

File diff suppressed because it is too large Load diff

View file

@ -13,7 +13,9 @@ using UnityEngine;
public class Despawn : MonoBehaviour public class Despawn : MonoBehaviour
{ {
private Player playerScript; private Player playerScript;
/*
NPCSpawn npcSpawnScript; NPCSpawn npcSpawnScript;
*/
/// <summary> /// <summary>
/// Destroy NPC object on trigger enter /// Destroy NPC object on trigger enter

View file

@ -1,53 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NPCSpawn : MonoBehaviour
{
/*public static NPCSpawn instance;*/
/*
[SerializeField] private float npcBufferTime;
*/
/*public bool npcSpawned = false;
*/
/*[SerializeField]
GameObject npc;*/
/*void Awake()
{
if (instance ==null)
{
instance = this;
}
else
{
Destroy(gameObject);
}
}*/
/*void Update()
{
if (!npcSpawned)
{
StartCoroutine(SpawnNPCAfterWait());
}
}*/
/*void SpawnNPC()
{
StopAllCoroutines();
GameObject spawnedNPC = Instantiate(npc, transform.position, Quaternion.identity);
npcSpawned = true;
GameManager.instance.currentNPC = spawnedNPC;
}*/
/*IEnumerator SpawnNPCAfterWait()
{
yield return new WaitForSeconds(npcBufferTime);
SpawnNPC();
}*/
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 5453e60feb81353409a4c7dea809cb8e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -95,7 +95,7 @@ public class NpcManager : MonoBehaviour
{ {
if (gm.shiftStarted) if (gm.shiftStarted)
{ {
if (currentNpcs.Count < 6 && !isSpawning) if (currentNpcs.Count < 4 && !isSpawning)
{ {
StartCoroutine(SpawnNPCAfterWait()); StartCoroutine(SpawnNPCAfterWait());
} }
@ -129,12 +129,13 @@ public class NpcManager : MonoBehaviour
isSpawning = true; isSpawning = true;
yield return new WaitForSeconds(npcBufferTime); yield return new WaitForSeconds(npcBufferTime);
if(currentNpcs.Count < 6) if(currentNpcs.Count < 4)
{ {
SpawnNPC(); SpawnNPC();
} }
isSpawning = false; isSpawning = false;
} }
[Serializable] [Serializable]
public struct Seat public struct Seat
{ {