Exemple #1
0
        private IEnumerator StartOpeningCor()
        {
            yield return(new WaitForSeconds(delayAfterActivating));

            playerCam.SetCameraNoice(camNoise, 1f, 1f, openingTime);
            timeToStopOpening = Time.time + openingTime;
            isOpening         = true;
            OpeningParticlePlay(true);
            yield return(new WaitForSeconds(delayBeforeStartMove));

            playerMover.AllowMove();
        }
        private IEnumerator ItemPickedUpCoroutine()
        {
            inventory.TakeLootSO(lootSO);
            takeButton.SetActive(false);
            yield return(new WaitForSeconds(0.5f));

            Destroy(instantiatedView);
            this.GetComponent <ParticleSystem>().Stop();
            yield return(new WaitForSeconds(secondsToDestroy));

            mover.AllowMove();
            Destroy(this.gameObject);
        }