예제 #1
0
    public int MeleeAttack(Vector2 dir)
    {
        int num = damager.AttackDir(dir);

        m_body.SetFaceDir(dir);

        if (damager.attackDash)
        {
            m_body.ForceMove(dir * damager.attackMoveDis * Mathf.Sqrt(2 * attackIndex));
        }

        //Debug.Log("attackIndex " + attackIndex);
        if (attackIndex != 0 && attackClip.Length > attackIndex - 1)
        {
            PlaySource(attackClip[attackIndex - 1]);
        }

        return(num);
    }