Change client spawn logic (coroutine)
This commit is contained in:
parent
c41d6af3d1
commit
63e88c3a27
4 changed files with 45 additions and 26 deletions
|
@ -136,8 +136,6 @@ public class Client_controller : MonoBehaviour, IUsable
|
|||
|
||||
if(status=="entering" && !agent.pathPending && agent.remainingDistance==0) //Reached seat ?
|
||||
{
|
||||
EventManager.Instance.spawnEvent(transform.position);
|
||||
|
||||
status="waiting";
|
||||
waitTimer=waitingTime;
|
||||
order = ClientManager.Instance.assignOrder();
|
||||
|
@ -162,7 +160,7 @@ public class Client_controller : MonoBehaviour, IUsable
|
|||
if(status=="consuming") //Consuming mug if there's one and reached destination
|
||||
{
|
||||
consumeTimer -= Time.deltaTime;
|
||||
if (consumeTimer < 0) //Finished consuming mug ?
|
||||
if(consumeTimer < 0) //Finished consuming mug ?
|
||||
{
|
||||
Mug obj = currentMug.GetComponent<Mug>();
|
||||
if(obj !=null)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue