Esempio n. 1
0
    void OnCollisionEnter2D(Collision2D col)
    {
        StartCoroutine(shake.ShakeEffect(0.1f, .05f));
        var emission = particles.emission;

        particles.Play();
        GetComponent <AudioSource>().Play();
    }
Esempio n. 2
0
    private IEnumerator KillCoroutine()
    {
        yield return(new WaitForSeconds(2.5f));

        SoundManager.Instance.FadeMusic();
        SoundManager.Instance.PlaySound(killSound);
        shakeScreenKill.ShakeEffect();
        flashRedBackground.StartFlash();
        swipeManager.InstantiateDeadModel(currentInterlocutor);
        yield return(new WaitForSeconds(3.9f));

        moveCharacterPivot.MoveToNewParent(characterPositionDefault, 1);
        StartNewTurn();
        yield return(new WaitForSeconds(1.1f));

        murderPanel.gameObject.SetActive(false);
    }
Esempio n. 3
0
    public void LoseHealth()
    {
        flashRedBackground.StartFlash();
        shakeScreen.ShakeEffect();

        currentPlayerHealth -= 1;
        if (currentPlayerHealth <= 0)
        {
            dialogueManager.OnDialogueEnd -= EndQuestion;
            dialogueManager.InterruptDialog();
            GameOver();
        }
        else
        {
            zawa.SetTrigger("Feedback");
            zawa2.SetTrigger("Feedback");
        }
    }