コード例 #1
0
    // Update is called once per frame
    void Update()
    {
        Vector2 delta = waypoints[currentWaypointIndex] - (Vector2)transform.position;

        if (delta.magnitude < speed)
        {
            velocity = delta;
            nextWaypoint();
        }
        else
        {
            velocity = delta.normalized * speed;
        }
        movementControllerScript.FindPassengers();
        movementControllerScript.Move(velocity);
    }
コード例 #2
0
 public void Update()
 {
     movementControllerScript.FindPassengers();
 }