- Timestamp:
- 2016-06-28 11:29:07 (7 years ago)
- Location:
- 2016/26/PinjaV/Pong
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
2016/26/PinjaV/Pong/Pong/Pong/Pong.cs
r7525 r7545 18 18 LuoKentta(); 19 19 AsetaOhjaimet(); 20 LisaaLaskurit(); 20 21 AloitaPeli(); 21 22 … … 32 33 maila2 = LuoMaila(Level.Right - 20.0, 0.0); 33 34 Level.CreateBorders(1.0, false); 34 Level.Background.Color = Color. Purple;35 Level.Background.Color = Color.Red; 35 36 Camera.ZoomToLevel(); 36 37 } … … 65 66 Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 66 67 } 67 void AsetaNopeus( IPhysicsObject maila, Vector nopeus)68 void AsetaNopeus(PhysicsObject maila, Vector nopeus) 68 69 { 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)) 69 77 maila.Velocity = nopeus; 70 78 } 79 void LisaaLaskurit() 80 { 81 // ... 82 } 71 83 }
Note: See TracChangeset
for help on using the changeset viewer.