Example #1
0
    public override void UpdateState(ShipAI controller)
    {
        SteerAction.SteerTowardsTarget(controller);

        float distance = Vector3.Distance(controller.wayPointList[controller.nextWayPoint].position, controller.transform.position);

        controller.throttle = distance > 30f ? 1f : 0f;
    }
Example #2
0
    public override void UpdateState(ShipAI controller)
    {
        SteerAction.SteerTowardsTarget(controller);

        if (CheckExitCondition(controller))
        {
            controller.FinishOrder();
        }
    }
Example #3
0
    public override void UpdateState(ShipAI controller)
    {
        SteerAction.SteerTowardsTarget(controller);

        PatrolWaypoints(controller);
    }