Esempio n. 1
0
    //_______________________________________________________________
    //_______________________________________________________________

    void Update()
    {
        if (!inputIsBlocked)
        {
            //Player Attack1 Call
            if (Input.GetButtonDown("Fire1") && attack1 == false && animator.GetBool("Death_bool") == false)
            {
                if (dialogGiver != null)
                {
                    bool inDialog = dialogGiver.AttemptDialog(this);
                    if (!inDialog)
                    {
                        BeginAttack();
                    }
                }
                else
                {
                    BeginAttack();
                }
            }

            //Player Hit Call
            if (Input.GetKeyDown(KeyCode.H) && animator.GetBool("Death_bool") == false)
            {
                StartCoroutine("Hit");
            }

            //Player Death Call
            if (Input.GetKeyDown(KeyCode.G) && animator.GetBool("Death_bool") == false)
            {
                StartCoroutine("Death");
            }
        }
    }