Changeset 7545 for 2016/26


Ignore:
Timestamp:
2016-06-28 11:29:07 (7 years ago)
Author:
karkaite
Message:
 
Location:
2016/26/PinjaV/Pong
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • 2016/26/PinjaV/Pong/Pong/Pong/Pong.cs

    r7525 r7545  
    1818        LuoKentta(); 
    1919        AsetaOhjaimet(); 
     20        LisaaLaskurit(); 
    2021        AloitaPeli(); 
    2122 
     
    3233        maila2 = LuoMaila(Level.Right - 20.0, 0.0); 
    3334        Level.CreateBorders(1.0, false); 
    34         Level.Background.Color = Color.Purple; 
     35        Level.Background.Color = Color.Red; 
    3536        Camera.ZoomToLevel(); 
    3637    } 
     
    6566        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 
    6667    } 
    67     void AsetaNopeus(IPhysicsObject maila, Vector nopeus) 
     68    void AsetaNopeus(PhysicsObject maila, Vector nopeus) 
    6869    { 
     70        if ((nopeus.Y < 0) && (maila.Bottom < Level.Bottom )) 
     71        { 
     72            maila.Velocity = Vector.Zero; 
     73            return; 
     74 
     75        } 
     76        if (( nopeus.Y > 0) && (maila.Top > Level.Top)) 
    6977        maila.Velocity = nopeus; 
    7078    } 
     79    void LisaaLaskurit() 
     80    {  
     81       // ... 
     82    } 
    7183} 
Note: See TracChangeset for help on using the changeset viewer.