private int getCharacterClosestTo(Vector2 pos) { pos = textFlow.GetLocalPosition(pos); int i = 0; foreach (Drawable d in textFlow.Children) { if (d.Position.X + d.Size.X / 2 > pos.X) { break; } i++; } return(i); }
private int getCharacterClosestTo(Vector2 pos) { pos = textFlow.GetLocalPosition(pos); int i = 0; foreach (Drawable d in textFlow.Children) { if (d.Position.X + d.Size.X / 2 > pos.X) { break; } i++; } return(i); }