Reduce duplicate code in Sprite constructors.
This commit is contained in:
@@ -110,13 +110,13 @@ namespace Barotrauma
|
||||
t = new Texture2D(graphicsDevice, 1, 1);
|
||||
t.SetData(new Color[] { Color.White });// fill the texture with white
|
||||
|
||||
submarineIcon = new Sprite("Content/UI/uiIcons.png", new Rectangle(0, 192, 64, 64), null);
|
||||
submarineIcon = new Sprite("Content/UI/uiIcons.png", new Rectangle(0, 192, 64, 64));
|
||||
submarineIcon.Origin = submarineIcon.size / 2;
|
||||
|
||||
arrow = new Sprite("Content/UI/uiIcons.png", new Rectangle(80, 240, 16, 16), null);
|
||||
arrow = new Sprite("Content/UI/uiIcons.png", new Rectangle(80, 240, 16, 16));
|
||||
arrow.Origin = arrow.size / 2;
|
||||
|
||||
SpeechBubbleIcon = new Sprite("Content/UI/uiIcons.png", new Rectangle(0, 129, 65, 61), null);
|
||||
SpeechBubbleIcon = new Sprite("Content/UI/uiIcons.png", new Rectangle(0, 129, 65, 61));
|
||||
SpeechBubbleIcon.Origin = SpeechBubbleIcon.size / 2;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user