Exemple #1
0
    public IEnumerator DamagedTimer(float transitionTime, float stunTime)
    {
        yield return(new WaitForSeconds(transitionTime));

        Idle();
        yield return(new WaitForSeconds(stunTime));

        controller.StartFollowState();
    }
Exemple #2
0
    private void CheckToFollow()
    {
        var dist = Vector2.Distance(controller.transform.position, player.position);

        if (dist <= escapeRange)
        {
            controller.StartFollowState(1);
        }
    }