private IEnumerator SpendClientTime(GameObject gameObjectClient) { _machine.Full = true; var clientBehaviour = gameObjectClient.GetComponent <ClientBehaviour>(); _clients.Add(clientBehaviour.GetClient()); clientBehaviour.RestClientMoney(_machine.MoneyGame); yield return(new WaitForSeconds(_machine.SpendTime)); _gameLevelManager.MakeMachinePurchase(_machine.MoneyGame); clientBehaviour.NotBusy(); _clients.Remove(clientBehaviour.GetClient()); clientBehaviour.GoRestArea(); Debug.Log("Machine esta ocupada ?? " + _machine.Full); _machine.Full = false; }