Changeset 8121 for 2016/30/NikoK


Ignore:
Timestamp:
2016-07-26 14:59:15 (7 years ago)
Author:
nimikeka
Message:
 
Location:
2016/30/NikoK
Files:
114 added
6 edited

Legend:

Unmodified
Added
Removed
  • 2016/30/NikoK/PongPjong/PongPjong/PongPjong/PongPjong.cs

    r8091 r8121  
    1515    PhysicsObject maila1; 
    1616    PhysicsObject maila2; 
     17 
     18    PhysicsObject vasenReuna; 
     19    PhysicsObject oikeaReuna; 
    1720 
    1821    IntMeter pelaajan1Pisteet; 
     
    4144        pallo.X = -200.0; 
    4245        pallo.Y = 0.0; 
    43  
     46        pallo.Restitution = 1.0; 
     47        pallo.KineticFriction = 0.0; 
     48        pallo.MomentOfInertia = Double.PositiveInfinity; 
    4449        AddCollisionHandler(pallo, KasittelePallonTormays); 
    4550 
     
    4752        maila2 = LuoMaila(Level.Right - 20.0, 0.0); 
    4853 
    49         PhysicsObject vasenReuna = Level.CreateLeftBorder(); 
     54        vasenReuna = Level.CreateLeftBorder(); 
    5055        vasenReuna.Restitution = 1.0; 
    5156        vasenReuna.IsVisible = false; 
     57 
     58         oikeaReuna = Level.CreateRightBorder(); 
     59        oikeaReuna.Restitution = 1.0; 
     60        oikeaReuna.IsVisible = false; 
     61 
     62        PhysicsObject alaReuna = Level.CreateBottomBorder(); 
     63        alaReuna.Restitution = 1.0; 
     64        alaReuna.IsVisible = false; 
     65 
     66        PhysicsObject ylaReuna = Level.CreateTopBorder(); 
     67        ylaReuna.Restitution = 1.0; 
     68        ylaReuna.IsVisible = false; 
     69 
    5270        pallo.Restitution = 1.0; 
    5371        Level.Background.Color = Color.Orange; 
     
    6381    { 
    6482        PhysicsObject maila1 = PhysicsObject.CreateStaticObject(20.0, 100.0); 
    65         maila1.Shape = Shape.Rectangle; 
     83        maila1.Shape = Shape.Circle; 
    6684        maila1.X = x; 
    6785        maila1.Y = y; 
     
    159177            pelaajan2Pisteet.Value += 1; 
    160178        } 
     179    } 
     180 
    161181 
    162182} 
Note: See TracChangeset for help on using the changeset viewer.