Changeset 214 for zhipeng_j/pong
- Timestamp:
- 2009-08-03 14:43:43 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
zhipeng_j/pong/Peli.cs
r207 r214 23 23 protected override void LoadContent() 24 24 { 25 IShape ympyra =Shapes . CreateCircle(20.0); 26 PhysicsObject pallo = new PhysicsObject(10.0, ympyra); 27 Level.Objects.Add(pallo); 25 Level = LuoKentta(); 26 27 } 28 29 Level LuoKentta() 30 { 31 Level kentta = new Level(this); 32 kentta.BackgroundColor = Color.Black; 33 34 IShape ympyra = Shapes.CreateCircle(20.0); 35 PhysicsObject pallo = new PhysicsObject(10.0, ympyra); 36 pallo.X = -200.0; 37 pallo.Y = 0.0; 38 pallo.Restitution = 1.0; 39 kentta.Objects.Add(pallo); 40 41 IShape suorakulmio = Shapes.CreateRectangle(20.0, 100.0); 42 PhysicsObject maila = PhysicsObject.CreateStaticObject(suorakulmio); 43 maila.X = kentta.Left + 20.0; 44 maila.Y = 0.0; 45 maila.Restitution = 1.0; 46 kentta.Objects.Add(maila); 47 return kentta; 48 49 50 51 52 53 28 54 55 maila.X = kentta.Left + 20.0; 56 maila.Y = 0.0; 57 maila.Restitution = 1.0; 58 kentta.Objects.Add(maila); 59 60 Level kentta.CreateBorder(1.0, false); 61 62 kentta.BackgroundColor = Color.Black; 29 63 30 64 … … 33 67 } 34 68 } 69 35 70 } 36 71 72 73 74 75 76 77
Note: See TracChangeset
for help on using the changeset viewer.