示例#1
0
    public virtual void Attack()
    {
        // call animator script for graphics and set the animation to attack one
        if (Time.time >= nextAttackTime)
        {
            animationHandler.AttackAnimation();

            soundHandler.AttackSound();

            isAttacking = true;

            StartCoroutine(collsionCheck(collisionCheckDelay));

            nextAttackTime = Time.time + 1f / attackRate; // timeout
        }
    }