示例#1
0
 void ProcessStartingIndex()
 {
     if (!HasPath)
     {
         return;
     }
     startingIndex      = Mathf.Clamp(startingIndex, 0, path.pathPoints.Count - 1);
     pathIndex          = startingIndex;
     transform.position = path.GetWorldPos(startingIndex);
     PreviewDestination();
     UpdatePathEvents();
 }
示例#2
0
    public static void DrawLabel(CharacterPath charPath, string labelText, int index)
    {
        GUIStyle labelStyle = new GUIStyle();

        labelStyle.normal.textColor  = Color.black;
        labelStyle.normal.background = guiBg;
        labelStyle.padding           = new RectOffset(4, 2, 2, 2);
        Handles.Label(charPath.GetWorldPos(index) + Vector3.up * .2f, labelText, labelStyle);
    }