- Timestamp:
- 2012-04-16 10:58:52 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
2012/JAO/Miisa/pong/pong/pong/pong.cs
r2675 r2684 9 9 public class pong : PhysicsGame 10 10 { 11 PhysicsObject pallo; 12 11 13 public override void Begin() 12 14 { 13 // TODO: Kirjoita ohjelmakoodisi tähän 15 // TODO: Alusta peli tässä 16 17 18 19 20 14 21 15 22 PhoneBackButton.Listen(ConfirmExit, "Lopeta peli"); 16 23 Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 17 24 } 25 26 void Luokentta() 27 { 28 Vector impulssi = new Vector(500.0, 0.0); 29 pallo.Hit(impulssi); 30 pallo = new PhysicsObject(40.0, 40.0); 31 32 pallo.Shape = Shape.Circle; 33 Add(pallo); 34 pallo.X = -200.0; 35 pallo.Y = 0.0; 36 pallo.Restitution = 1.0; 37 Level.CreateBorders(1.0, false); 38 39 Level.BackgroundColor = Color.Red; 40 Camera.ZoomToLevel(); 41 42 } 43 44 18 45 }
Note: See TracChangeset
for help on using the changeset viewer.