- Timestamp:
- 2014-07-01 10:10:12 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
2014/27/MikkoI/MikonPeli/MikonPeli/MikonPeli/MikonPeli.cs
r5190 r5196 21 21 var pieceWidth = this.Width / pieceCountX; 22 22 var pieceHeight = this.Height / pieceCountY; 23 if (pieceWidth < 1 || pieceHeight < 1) { return; } 23 24 //loop x and y through 24 25 //calc left corner … … 67 68 if (teksti != null) 68 69 { 69 teksti.Text = (1000 / gameTime.ElapsedGameTime.Milliseconds) + "fps"; 70 int ms = gameTime.ElapsedGameTime.Milliseconds; 71 if (ms > 0) 72 { 73 teksti.Text = (1000 / ms) + "fps"; 74 } 70 75 } 71 76 base.Draw(gameTime); … … 73 78 BreakablePhysicsObject Spawn() 74 79 { 75 BreakablePhysicsObject boxi = new BreakablePhysicsObject(this, 50.0, 50.0);80 BreakablePhysicsObject boxi = new BreakablePhysicsObject(this, 500.0, 500.0); 76 81 Add(boxi); 77 82 return boxi;
Note: See TracChangeset
for help on using the changeset viewer.