- Timestamp:
- 2010-08-03 13:47:04 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
2010/31/kirsipienmaki@gmail.com/Pong/Peli.cs
r1554 r1557 18 18 LuoKentta(); 19 19 AsetaOhjaimet(); 20 LisaaLaskurit(); 20 21 AloitaPeli(); 21 22 } … … 38 39 Camera.ZoomToLevel(); 39 40 } 41 40 42 void AloitaPeli() 41 43 { … … 55 57 return maila; 56 58 } 59 57 60 void AsetaOhjaimet() 58 61 { … … 71 74 } 72 75 void AsetaNopeus(PhysicsObject maila, Vector nopeus) 76 { 77 if ((nopeus.Y < 0) && (maila.Bottom < Level.Bottom)) 78 { 79 maila.Velocity = Vector.Zero; 80 return; 81 } 82 83 if ((nopeus.Y > 0) && (maila.Top > Level.Top)) 84 { 85 maila.Velocity = Vector.Zero; 86 return; 87 } 88 89 90 maila.Velocity = nopeus; 91 } 92 void LisaaLaskurit() 73 93 { 74 maila.Velocity = nopeus; 94 //... 95 } 96 IntMeter LuoPisteLaskuri( double x, double y ) 97 { 98 IntMeter laskuri = new IntMeter(0); 99 laskuri.MaxValue = 10; 100 Label nautto = new Label(); 101 naytto.BindTo(laskuri); 102 naytto.X = x; 103 naytto.Y = y; 104 naytto.TextColor = Color.White; 105 Add(naytto); 106 return laskuri; 75 107 } 76 108 77 109 } 78 110 79 80
Note: See TracChangeset
for help on using the changeset viewer.