- Timestamp:
- 2012-04-16 11:34:23 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
2012/JAO/John/pong/pong/pong/pong.cs
r2677 r2688 11 11 public override void Begin() 12 12 { 13 // TODO: Kirjoita ohjelmakoodisi tähän 14 13 PhysicsObject pallo = new PhysicsObject(40.0, 40.0); 14 Add(pallo); 15 pallo.Shape = Shape.Circle; 16 pallo.X = -200.0; 17 pallo.Y = 0.0; 18 Vector impulssi = new Vector ( 500.0, 0.0 ); 19 pallo.Hit(impulssi); 20 pallo.Restitution = 1.0; 21 Level.BackgroundColor = Color.Black; 22 Level.CreateBorders(1.0, false); 23 Camera.ZoomToLevel(); 24 PhysicsObject maila = PhysicsObject.CreateStaticObject(20.0, 100.0); 25 maila.Shape = Shape.Rectangle; 26 maila.X = Level.Left + 20.0; 27 maila.Y = 0.0; 28 maila.Restitution = 1.0; 29 Add(maila); 30 PhysicsObject maila2 = PhysicsObject.CreateStaticObject(20.0, 100.0); 31 maila.Shape = Shape.Rectangle; 32 maila.X = Level.Right - 20.0; 33 maila.Y = 0.0; 34 maila2.Restitution = 1.0; 35 Add( maila2 ); 15 36 PhoneBackButton.Listen(ConfirmExit, "Lopeta peli"); 16 37 Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli");
Note: See TracChangeset
for help on using the changeset viewer.