Reduce duplicate code in Sprite constructors.

This commit is contained in:
itchyOwl
2018-04-06 15:56:32 +03:00
parent 1d30cbfac7
commit 9fc65298e8
2 changed files with 23 additions and 33 deletions
@@ -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;
}