Changeset 5258


Ignore:
Timestamp:
2014-07-01 23:18:34 (9 years ago)
Author:
mijoilmo
Message:

Päivitetty MikonPhysicsObject? image inherit

Location:
2014/27/AleksanteriV/Protokolla236
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • 2014/27/AleksanteriV/Protokolla236/Protokolla236/Protokolla236/MikonPhysicsObject.cs

    r5257 r5258  
    3939                        childBox.Color = this.Color; 
    4040                        childBox.Tag = this.Tag; 
    41                         childBox.Image = this.Image; 
     41                        int w=this.Image.Width/pieceCountX,h=this.Image.Height/pieceCountY; 
     42                        childBox.Image = this.Image.Area( 
     43                            w*x, 
     44                            h*(pieceCountY-y-1), 
     45                            w*(x+1), 
     46                            h*((pieceCountY-y-1)+1) 
     47                        ); 
    4248                        childBox.AbsoluteAngle = this.AbsoluteAngle; 
    4349                        childBox.AngularVelocity = this.AngularVelocity; 
     
    5157                        //childBox.Position += offset; 
    5258 
    53                         if (RandomGen.NextDouble(0, 1) < 0.2) { 
    54                             childBox.Break(method,pieceCountX,pieceCountY); 
     59                        if (RandomGen.NextDouble(0, 1) < 0.2) 
     60                        { 
     61                            childBox.Break(method, pieceCountX, pieceCountY); 
    5562                        } 
    5663 
  • 2014/27/AleksanteriV/Protokolla236/Protokolla236/Protokolla236/Protokolla236.cs

    r5217 r5258  
    401401        pelaajanAse.InfiniteAmmo = true; 
    402402        pelaajanAse.Power.DefaultValue = 200; 
    403         pelaajanAse.FireRate = 10000; 
     403        pelaajanAse.FireRate = 199; 
    404404        pelaajanAse.ProjectileCollision = AmmusOsui; 
    405405        pelaaja.Add(pelaajanAse); 
Note: See TracChangeset for help on using the changeset viewer.