Exemplo n.º 1
0
    public void TakeDamage(float damage)
    {
        health -= damage;
        StartCoroutine(TakeDamageEffect());
        sceneCamera.ShakeCamera(0.15f, 0.3f);                    //Camera
        UImanager._instanceUiManager.ChangeHpLabel((int)health); //UI에 전달
        animator.SetTrigger("Damage");

        if (health <= 0)
        {
            PlayerDead();
        }
    }