private Label CreateLabel(int power, EncounterPosition position) { var label = new Label(); label.Text = power.ToString(); var numCenterPos = PositionComponent.IndexToVector(position.X, position.Y); label.AddFontOverride("font", this._damageFont); label.AddColorOverride("font_color", new Color(1f, 0f, 0f)); // The size isn't determined until after it's first placed, so we place, then reposition according to size to center it. label.SetPosition(numCenterPos); var size = label.RectSize; label.SetPosition(new Vector2(numCenterPos.x - size.x / 2, numCenterPos.y - size.y / 2)); return(label); }