StyleCop clean OpenRA.Game
This commit is contained in:
@@ -14,14 +14,14 @@ namespace OpenRA.Graphics
|
||||
{
|
||||
public class Sprite
|
||||
{
|
||||
public readonly Rectangle bounds;
|
||||
public readonly Sheet sheet;
|
||||
public readonly BlendMode blendMode;
|
||||
public readonly TextureChannel channel;
|
||||
public readonly float2 size;
|
||||
public readonly float2 offset;
|
||||
public readonly float2 fractionalOffset;
|
||||
public readonly float top, left, bottom, right;
|
||||
public readonly Rectangle Bounds;
|
||||
public readonly Sheet Sheet;
|
||||
public readonly BlendMode BlendMode;
|
||||
public readonly TextureChannel Channel;
|
||||
public readonly float2 Size;
|
||||
public readonly float2 Offset;
|
||||
public readonly float2 FractionalOffset;
|
||||
public readonly float Top, Left, Bottom, Right;
|
||||
|
||||
public Sprite(Sheet sheet, Rectangle bounds, TextureChannel channel)
|
||||
: this(sheet, bounds, float2.Zero, channel, BlendMode.Alpha) { }
|
||||
@@ -31,19 +31,19 @@ namespace OpenRA.Graphics
|
||||
|
||||
public Sprite(Sheet sheet, Rectangle bounds, float2 offset, TextureChannel channel, BlendMode blendMode)
|
||||
{
|
||||
this.sheet = sheet;
|
||||
this.bounds = bounds;
|
||||
this.offset = offset;
|
||||
this.channel = channel;
|
||||
this.size = new float2(bounds.Size);
|
||||
this.blendMode = blendMode;
|
||||
Sheet = sheet;
|
||||
Bounds = bounds;
|
||||
Offset = offset;
|
||||
Channel = channel;
|
||||
Size = new float2(bounds.Size);
|
||||
BlendMode = blendMode;
|
||||
|
||||
this.fractionalOffset = offset / this.size;
|
||||
FractionalOffset = offset / Size;
|
||||
|
||||
left = (float)bounds.Left / sheet.Size.Width;
|
||||
top = (float)bounds.Top / sheet.Size.Height;
|
||||
right = (float)bounds.Right / sheet.Size.Width;
|
||||
bottom = (float)bounds.Bottom / sheet.Size.Height;
|
||||
Left = (float)bounds.Left / sheet.Size.Width;
|
||||
Top = (float)bounds.Top / sheet.Size.Height;
|
||||
Right = (float)bounds.Right / sheet.Size.Width;
|
||||
Bottom = (float)bounds.Bottom / sheet.Size.Height;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user