Ignore:
Timestamp:
2014-07-01 11:01:08 (9 years ago)
Author:
mijoilmo
Message:
 
Location:
2014/27/AleksanteriV/Protokolla236/Protokolla236/Protokolla236
Files:
6 edited

Legend:

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

    r5199 r5204  
    2121                var pieceWidth = this.Width / pieceCountX; 
    2222                var pieceHeight = this.Height / pieceCountY; 
    23                 if (pieceWidth < 1 || pieceHeight < 1) { return; } 
     23                if (pieceWidth < 3 || pieceHeight < 3) { return; } 
     24                var useCollisions = true; 
     25                if (pieceWidth < 10 || pieceHeight < 10) { useCollisions = false; } 
    2426                //loop x and y through 
    2527                //calc left corner 
     
    3133                    { 
    3234                        MikonPhysicsObject childBox = new MikonPhysicsObject(this.game, pieceWidth, pieceHeight); 
     35                        childBox.CollisionIgnoreGroup = 2; 
    3336                        childBox.Color = this.Color; 
     37                        childBox.Tag = this.Tag; 
    3438                        childBox.AbsoluteAngle = this.AbsoluteAngle; 
    3539                        childBox.AngularVelocity = this.AngularVelocity; 
    3640 
    3741                        childBox.Position = this.Position + startCorner 
    38                             + Vector.FromLengthAndAngle(x * pieceWidth, this.AbsoluteAngle) //plus x 
    39                             + Vector.FromLengthAndAngle(y * pieceHeight, this.AbsoluteAngle + Angle.RightAngle); //plus y 
     42                            + Vector.FromLengthAndAngle(x * pieceWidth, this.AbsoluteAngle) //plus x                                                                
     43                            + Vector.FromLengthAndAngle(y * pieceHeight, this.AbsoluteAngle + Angle.RightAngle); //plus y                                           
    4044 
    4145                        childBox.Velocity = this.Velocity; 
    4246 
    43                         //childBox.Position += offset; 
     47                        //childBox.Position += offset;                                                                                                              
    4448 
    4549                        Game.Add(childBox); 
  • 2014/27/AleksanteriV/Protokolla236/Protokolla236/Protokolla236/Protokolla236.cs

    r5199 r5204  
    198198 
    199199 
    200         Gravity = new Vector(0.0, -150.0); 
     200        //Gravity = new Vector(0.0, -150.0); 
    201201        Level.CreateBorders(0.5, true); 
    202202        LisaaNappaimet(pelaajat); 
Note: See TracChangeset for help on using the changeset viewer.