bool IsPastWayPoint() { if (CONTROL_MECHANISM.IsFacingForward()) { if (CONTROL_MECHANISM.transform.position.x > AI_CONTROL.GetNextWayPoint().transform.position.x) { return(true); } } else { if (CONTROL_MECHANISM.transform.position.x < AI_CONTROL.GetNextWayPoint().transform.position.x) { return(true); } } return(false); }
public override void RunFrameUpdate() { if (UpdateAnimation()) { if (ANIMATION_DATA.PlayTime > jump.JumpTime + 0.5f) { if (MOVEMENT_DATA.IsGrounded) { characterStateController.ChangeState((int)AxeEnemyState.AxeFallingToLanding); return; } if (AI_CONTROL.transform.position.y > AI_CONTROL.GetNextWayPoint().transform.position.y) { if (!IsPastWayPoint()) { move.MoveForward(MOVEMENT_DATA.WalkSpeed * AI_CONTROL.GetNextWayPoint().AirWalkSpeedMultiplier, CHARACTER_TRANSFORM.rotation.eulerAngles.y); } } } } }