private void DeterminationDirection() { if (WayToTarget[Index].x <gameObject.transform.position.x || WayToTarget[Index].x> gameObject.transform.position.x) { DirectionTravel_enemy = WayToTarget[Index].x < gameObject.transform.position.x ? DirectionTravel.West : DirectionTravel.East; } else { DirectionTravel_enemy = WayToTarget[Index].y > gameObject.transform.position.y ? DirectionTravel.North : DirectionTravel.South; } InMove = true; }
private void OnAction(DirectionTravel type) { DirectionTravel_player = type; StartCoroutine(DetermineAction()); }