Ignore:
Timestamp:
2014-07-01 10:10:12 (9 years ago)
Author:
mijoilmo
Message:

a

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 2014/27/MikkoI/MikonPeli/MikonPeli/MikonPeli/MikonPeli.cs

    r5190 r5196  
    2121                var pieceWidth = this.Width / pieceCountX; 
    2222                var pieceHeight = this.Height / pieceCountY; 
     23                if (pieceWidth < 1 || pieceHeight < 1) { return; } 
    2324                //loop x and y through 
    2425                //calc left corner 
     
    6768        if (teksti != null) 
    6869        { 
    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            } 
    7075        } 
    7176        base.Draw(gameTime); 
     
    7378    BreakablePhysicsObject Spawn() 
    7479    { 
    75         BreakablePhysicsObject boxi = new BreakablePhysicsObject(this,50.0, 50.0); 
     80        BreakablePhysicsObject boxi = new BreakablePhysicsObject(this, 500.0, 500.0); 
    7681        Add(boxi); 
    7782        return boxi; 
Note: See TracChangeset for help on using the changeset viewer.