Skip to content

Commit

Permalink
Remove trailing whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
discosultan committed Jun 22, 2017
1 parent 4d29721 commit 33a1377
Show file tree
Hide file tree
Showing 101 changed files with 864 additions and 864 deletions.
4 changes: 2 additions & 2 deletions Samples/FarseerPhysics/FarseerMagic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class FarseerMagic : Game
SpriteFont Font;

KeyboardState oldKeys;

// Store reference to lighting system.
PenumbraComponent penumbra;

Expand Down Expand Up @@ -127,7 +127,7 @@ protected override void LoadContent()

// Unit conversion rule to get the right position data between simulation space and display space
ConvertUnits.SetDisplayUnitToSimUnitRatio(MeterInPixels);

_light = new PointLight
{
Position = new Vector2(-250, 0),
Expand Down
10 changes: 5 additions & 5 deletions Samples/FarseerPhysics/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("FarseerPhysics")]
Expand All @@ -14,8 +14,8 @@
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

Expand All @@ -25,11 +25,11 @@
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
Expand Down
12 changes: 6 additions & 6 deletions Samples/HelloPenumbra/HelloPenumbra.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
using System;

namespace HelloPenumbra
{
{
public class HelloPenumbra : Game
{
GraphicsDeviceManager graphics;
GraphicsDeviceManager graphics;

// Store reference to lighting system.
PenumbraComponent penumbra;

// Create sample light source and shadow hull.
Light light = new PointLight
{
{
Scale = new Vector2(1000f), // Range of the light source (how far the light will travel)
ShadowType = ShadowType.Solid // Will not lit hulls themselves
};
Expand All @@ -31,15 +31,15 @@ public HelloPenumbra()
Content.RootDirectory = "Content";

// Create the lighting system and add sample light and hull.
penumbra = new PenumbraComponent(this);
penumbra = new PenumbraComponent(this);
penumbra.Lights.Add(light);
penumbra.Hulls.Add(hull);
}

protected override void Initialize()
{
// Initialize the lighting system.
penumbra.Initialize();
penumbra.Initialize();
}

protected override void Update(GameTime gameTime)
Expand All @@ -48,7 +48,7 @@ protected override void Update(GameTime gameTime)
Exit();

// Animate light position and hull rotation.
light.Position =
light.Position =
new Vector2(400f, 240f) + // Offset origin
new Vector2( // Position around origin
(float)Math.Cos(gameTime.TotalGameTime.TotalSeconds),
Expand Down
10 changes: 5 additions & 5 deletions Samples/HelloPenumbra/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("HelloPenumbra")]
Expand All @@ -14,8 +14,8 @@
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

Expand All @@ -25,11 +25,11 @@
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
Expand Down
16 changes: 8 additions & 8 deletions Samples/Platformer2D/Game.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class PlatformerGame : Microsoft.Xna.Framework.Game
// When the time remaining is less than the warning time, it blinks on the hud
private static readonly TimeSpan WarningTime = TimeSpan.FromSeconds(30);

// We store our input states so that we only poll once per frame,
// We store our input states so that we only poll once per frame,
// then we use the same input state wherever needed
private GamePadState gamePadState;
private KeyboardState keyboardState;
Expand Down Expand Up @@ -91,7 +91,7 @@ public PlatformerGame()
protected override void LoadContent()
{
// Create a new SpriteBatch, which can be used to draw textures.
spriteBatch = new SpriteBatch(GraphicsDevice);
spriteBatch = new SpriteBatch(GraphicsDevice);

// Load fonts
hudFont = Content.Load<SpriteFont>("Fonts/Hud");
Expand Down Expand Up @@ -138,7 +138,7 @@ protected override void Update(GameTime gameTime)
HandleInput(gameTime);

// update our level, passing down the GameTime along with all of our input states
level.Update(gameTime, keyboardState, gamePadState,
level.Update(gameTime, keyboardState, gamePadState,
accelerometerState, Window.CurrentOrientation);

if (level.Player.Velocity != Vector2.Zero)
Expand Down Expand Up @@ -195,7 +195,7 @@ private void LoadNextLevel()
// Unloads the content for the current level before loading the next one.
if (level != null)
level.Dispose();

// Load the level.
string levelPath = string.Format("Content/Levels/{0}.txt", levelIndex);
using (Stream fileStream = TitleContainer.OpenStream(levelPath))
Expand All @@ -216,8 +216,8 @@ protected override void Draw(GameTime gameTime)
{
// Everything after this call will be affected by the lighting system.
penumbra.BeginDraw();
graphics.GraphicsDevice.Clear(Color.CornflowerBlue);

graphics.GraphicsDevice.Clear(Color.CornflowerBlue);

spriteBatch.Begin(SpriteSortMode.Immediate, null, null, null, null,null, globalTransformation);
level.Draw(gameTime, spriteBatch);
Expand All @@ -229,7 +229,7 @@ protected override void Draw(GameTime gameTime)
// Draw stuff that is not affected by lighting (UI, etc).
spriteBatch.Begin(SpriteSortMode.Immediate, null, null, null, null, null, globalTransformation);
DrawHud();
spriteBatch.End();
spriteBatch.End();

base.Draw(gameTime);
}
Expand Down Expand Up @@ -262,7 +262,7 @@ private void DrawHud()
// Draw score
float timeHeight = hudFont.MeasureString(timeString).Y;
DrawShadowedString(hudFont, "SCORE: " + level.Score.ToString(), hudLocation + new Vector2(0.0f, timeHeight * 1.2f), Color.Yellow);

// Determine the status overlay message to show.
Texture2D status = null;
if (level.TimeRemaining == TimeSpan.Zero)
Expand Down
8 changes: 4 additions & 4 deletions Samples/Platformer2D/Game/Accelerometer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public static class Accelerometer
#if WINDOWS_PHONE
// the accelerometer sensor on the device
private static Microsoft.Devices.Sensors.Accelerometer accelerometer = new Microsoft.Devices.Sensors.Accelerometer();

// we need an object for locking because the ReadingChanged event is fired
// on a different thread than our game
private static object threadLock = new object();
Expand All @@ -51,8 +51,8 @@ public static void Initialize()
}

#if WINDOWS_PHONE
// try to start the sensor only on devices, catching the exception if it fails
if (Microsoft.Devices.Environment.DeviceType == Microsoft.Devices.DeviceType.Device)
// try to start the sensor only on devices, catching the exception if it fails
if (Microsoft.Devices.Environment.DeviceType == Microsoft.Devices.DeviceType.Device)
{
try
{
Expand All @@ -76,7 +76,7 @@ public static void Initialize()
// remember that we are initialized
isInitialized = true;
}

#if WINDOWS_PHONE
private static void sensor_ReadingChanged(object sender, Microsoft.Devices.Sensors.AccelerometerReadingEventArgs e)
{
Expand Down
2 changes: 1 addition & 1 deletion Samples/Platformer2D/Game/Animation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public int FrameHeight

/// <summary>
/// Constructors a new animation.
/// </summary>
/// </summary>
public Animation(Texture2D texture, float frameTime, bool isLooping)
{
this.texture = texture;
Expand Down
2 changes: 1 addition & 1 deletion Samples/Platformer2D/Game/Enemy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public void Update(GameTime gameTime)
{
// Move in the current direction.
Vector2 velocity = new Vector2((int)direction * MoveSpeed * elapsed, 0.0f);
Position = position + velocity;
Position = position + velocity;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Samples/Platformer2D/Game/Gem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public void Update(GameTime gameTime)
const float BounceSync = -0.75f;

// Bounce along a sine curve over time.
// Include the X coordinate so that neighboring gems bounce in a nice wave pattern.
// Include the X coordinate so that neighboring gems bounce in a nice wave pattern.
double t = gameTime.TotalGameTime.TotalSeconds * BounceRate + Position.X * BounceSync;
bounce = (float)Math.Sin(t) * BounceHeight * texture.Height;

Expand Down
16 changes: 8 additions & 8 deletions Samples/Platformer2D/Game/Level.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public Player Player
private List<Gem> gems = new List<Gem>();
private List<Enemy> enemies = new List<Enemy>();

// Key locations in the level.
// Key locations in the level.
private Vector2 start;
private Point exit = InvalidPosition;
private static readonly Point InvalidPosition = new Point(-1, -1);
Expand Down Expand Up @@ -70,7 +70,7 @@ public TimeSpan TimeRemaining

private const int PointsPerSecond = 5;

// Level content.
// Level content.
public ContentManager Content
{
get { return content; }
Expand Down Expand Up @@ -104,7 +104,7 @@ public Level(IServiceProvider serviceProvider, Stream fileStream, int levelIndex

timeRemaining = TimeSpan.FromMinutes(2.0);

LoadTiles(fileStream);
LoadTiles(fileStream);

// Load background layer textures. For now, all levels must
// use the same backgrounds and only use the left-most part of them.
Expand Down Expand Up @@ -356,7 +356,7 @@ private static Hull HullFromRectangle(Rectangle bounds, int width)
return new Hull(tilePoints)
{
Position = new Vector2(bounds.X, bounds.Y),
Scale = new Vector2(bounds.Width * width, bounds.Height)
Scale = new Vector2(bounds.Width * width, bounds.Height)
};
}

Expand Down Expand Up @@ -384,7 +384,7 @@ public TileCollision GetCollision(int x, int y)

/// <summary>
/// Gets the bounding rectangle of a tile in world space.
/// </summary>
/// </summary>
public Rectangle GetBounds(int x, int y)
{
return new Rectangle(x * Tile.Width, y * Tile.Height, Tile.Width, Tile.Height);
Expand Down Expand Up @@ -415,9 +415,9 @@ public int Height
/// and handles the time limit with scoring.
/// </summary>
public void Update(
GameTime gameTime,
KeyboardState keyboardState,
GamePadState gamePadState,
GameTime gameTime,
KeyboardState keyboardState,
GamePadState gamePadState,
AccelerometerState accelState,
DisplayOrientation orientation)
{
Expand Down
18 changes: 9 additions & 9 deletions Samples/Platformer2D/Game/Player.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public Vector2 Velocity
private const float JumpLaunchVelocity = -3500.0f;
private const float GravityAcceleration = 3400.0f;
private const float MaxFallSpeed = 550.0f;
private const float JumpControlPower = 0.14f;
private const float JumpControlPower = 0.14f;

// Input configuration
private const float MoveStickScale = 1.0f;
Expand Down Expand Up @@ -152,14 +152,14 @@ public void LoadContent()
celebrateAnimation = new Animation(Level.Content.Load<Texture2D>("Sprites/Player/Celebrate"), 0.1f, false);
dieAnimation = new Animation(Level.Content.Load<Texture2D>("Sprites/Player/Die"), 0.1f, false);

// Calculate bounds within texture size.
// Calculate bounds within texture size.
int width = (int)(idleAnimation.FrameWidth * 0.4);
int left = (idleAnimation.FrameWidth - width) / 2;
int height = (int)(idleAnimation.FrameWidth * 0.8);
int top = idleAnimation.FrameHeight - height;
localBounds = new Rectangle(left, top, width, height);

// Load sounds.
// Load sounds.
killedSound = Level.Content.Load<SoundEffect>("Sounds/PlayerKilled");
jumpSound = Level.Content.Load<SoundEffect>("Sounds/PlayerJump");
fallSound = Level.Content.Load<SoundEffect>("Sounds/PlayerFall");
Expand All @@ -186,9 +186,9 @@ public void Reset(Vector2 position)
/// we need to reverse our motion when the orientation is in the LandscapeRight orientation.
/// </remarks>
public void Update(
GameTime gameTime,
KeyboardState keyboardState,
GamePadState gamePadState,
GameTime gameTime,
KeyboardState keyboardState,
GamePadState gamePadState,
AccelerometerState accelState,
DisplayOrientation orientation)
{
Expand Down Expand Up @@ -217,9 +217,9 @@ public void Update(
/// Gets player horizontal movement and jump commands from input.
/// </summary>
private void GetInput(
KeyboardState keyboardState,
KeyboardState keyboardState,
GamePadState gamePadState,
AccelerometerState accelState,
AccelerometerState accelState,
DisplayOrientation orientation)
{
// Get analog horizontal movement.
Expand Down Expand Up @@ -284,7 +284,7 @@ public void ApplyPhysics(GameTime gameTime)
else
velocity.X *= AirDragFactor;

// Prevent the player from running faster than his top speed.
// Prevent the player from running faster than his top speed.
velocity.X = MathHelper.Clamp(velocity.X, -MaxMoveSpeed, MaxMoveSpeed);

// Apply velocity.
Expand Down
4 changes: 2 additions & 2 deletions Samples/Platformer2D/Game/VirtualGamePad.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public GamePadState GetState(TouchCollection touchState, GamePadState gpState)
{
//Work out what buttons are pressed based on the touchState
Buttons buttonsPressed = 0;

foreach (var touch in touchState)
{
if (touch.State == TouchLocationState.Moved || touch.State == TouchLocationState.Pressed)
Expand Down Expand Up @@ -99,7 +99,7 @@ public GamePadState GetState(TouchCollection touchState, GamePadState gpState)
buttonsPressed |= (gpButtons.RightStick == ButtonState.Pressed ? Buttons.RightStick : 0);

var buttons = new GamePadButtons(buttonsPressed);

return new GamePadState(gpState.ThumbSticks, gpState.Triggers, buttons, gpState.DPad);
}
}
Expand Down
2 changes: 1 addition & 1 deletion Samples/Platformer2D/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplicat
}
#elif IPHONE
[Register ("AppDelegate")]
class Program : UIApplicationDelegate
class Program : UIApplicationDelegate
{
private PlatformerGame game;

Expand Down
Loading

0 comments on commit 33a1377

Please sign in to comment.