Example #1
0
    public void Walk(Vector3 dir)
    {
        spriteRenderer.flipX = dir.x < 0f;
        lastDir = dir;

        animator.setAnimation(UnitAnimatorState.Run);
        Move(dir);
    }