Changeset 214
- Timestamp:
- 2009-08-03 14:43:43 (14 years ago)
- Location:
- zhipeng_j
- Files:
-
- 11 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
zhipeng_j/pengJ/Peli.cs
r201 r214 56 56 t.Accelerate(vaanto); 57 57 58 return false;58 59 59 } 60 60 61 bool kaannaPutkea(ControlEvent e)62 {63 Tank t = e.Parameter0 as Tank;64 Angle kaanto = e.Parameter1.ToAngle();65 61 66 // Tässä käännetään tankin piippua67 t.TurnCannon(kaanto);68 62 69 return false; 63 70 64 } 71 65 } -
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.