Beispiel #1
0
    public void Died()
    {
        SFXAudioManager.SFXManager.PlaySFX(DeathClipName);
        Player.ToggleInput();

        gameObject.layer = LayerMask.NameToLayer(InvenurableLayer);

        MyAnimator.SetTrigger(DeathParameter);
    }
Beispiel #2
0
    IEnumerator Teletransport()
    {
        PlayerMovement.ToggleInput();
        AreaManager.EnableNextArea();

        Player.transform.position = ExitPoint.transform.position;

        PlayerStats.EnteredArea(ExitPoint.transform.position);

        Camera.transform.position = CameraPosition;

        yield return(new WaitForSeconds(LockInputDurantion));

        AreaManager.DisablePreviousArea();
        PlayerMovement.ToggleInput();
    }
Beispiel #3
0
    public void StartDialogue(Dialogue dialogue)
    {
        ThorInput.ToggleInput();
        Sentences.Clear();
        ContinueButtonText.text = BeginText;
        Time.timeScale          = 0;

        foreach (string sentence in dialogue.Sentences)
        {
            Sentences.Enqueue(sentence);
        }

        DialogueUI.SetActive(true);
        TextDialogue.SetActive(true);

        DisplayNextSentence();
    }
Beispiel #4
0
    IEnumerator MoveCamera(Vector3 NewCameraPosition, Vector3 NewPlayerPosition)
    {
        Player.transform.position = NewPlayerPosition;

        Thor.ToggleInput();

        AreaManager.EnableNextArea();

        float timeElapsed = 0;

        while (timeElapsed < LerpSmoothness)
        {
            Camera.transform.position = Vector3.Lerp(Camera.transform.position, NewCameraPosition, timeElapsed / LerpSmoothness);
            timeElapsed += Time.deltaTime;

            yield return(null);
        }

        AreaManager.DisablePreviousArea();

        Thor.ToggleInput();
        ThorStats.EnteredArea(Player.transform.position);
    }