Exemplo n.º 1
0
    IEnumerator LoadRoomFromSpawnPointIntern(SpawnPoint spawnPoint)
    {
        Debug.Log("loading new room from spawnPoint");
        player2D.LockMovement();
        LoadRoom(spawnPoint.room);

        player.transform.position = spawnPoint.gameObject.transform.position;
        UpdateCamera(spawnPoint.gameObject.transform);

        blackOverlay.CrossFadeAlpha(0, .5f, false);
        yield return(new WaitForSeconds(.5f));

        player2D.UnlockMovement();
    }
    IEnumerator InitBoulderLogic()
    {
        float shakeDuration = 2;

        player2D.LockMovement();
        cameraEffects.ShakeFor(shakeDuration, 0.7f);
        yield return(new WaitForSeconds(shakeDuration));

        player2D.UnlockMovement();

        dialogueManager.DisplayDialogue(boulderDialogue, () => { });
    }
Exemplo n.º 3
0
    private IEnumerator InitBossFight()
    {
        player2D.LockMovement();
        camera2DFollow.AttachTarget(boss4711.transform);

        yield return(new WaitForSeconds(1));

        boss4711.PlayBreakFreeAnimation();
        cameraEffects.ShakeFor(5, 1f);

        yield return(new WaitForSeconds(5));

        camera2DFollow.AttachTarget(player.transform);

        yield return(new WaitForSeconds(1));

        player2D.UnlockMovement();
        InitBoss();
    }