Example #1
0
    public void PauseNormalPlay()
    {
        player.FreezePlayerMovement();
        SpawnManager.Instance.DeactivateBehaviour();
        if (cameraProperties.redVignetteOverlay.enabled)
        {
            cameraProperties.redVignetteOverlay.enabled = false;
        }

        for (int i = 0; i < ObjectPooler.Instance.pooledObjects.Count; i++)
        {
            if (ObjectPooler.Instance.pooledObjects[i].GetComponent <FallingObject>() != null)
            {
                FallingObject obj = ObjectPooler.Instance.pooledObjects[i].GetComponent <FallingObject>();

                obj.RigidbodySimulation(false);
            }
        }
    }
Example #2
0
    public void ResumeNormalPlay()
    {
        player.UnFreezePlayerMovement();
        SpawnManager.Instance.ActivateBehaviour();
        levelManager.StartGameTimer();

        if (hud.heartController.lastLife)
        {
            cameraProperties.redVignetteOverlay.enabled = true;
        }

        for (int i = 0; i < ObjectPooler.Instance.pooledObjects.Count; i++)
        {
            if (ObjectPooler.Instance.pooledObjects[i].GetComponent <FallingObject>() != null)
            {
                FallingObject obj = ObjectPooler.Instance.pooledObjects[i].GetComponent <FallingObject>();

                obj.RigidbodySimulation(true);
            }
        }
    }