Changeset 2039 for 2011/24


Ignore:
Timestamp:
2011-06-15 21:34:05 (8 years ago)
Author:
akosrahi
Message:
 
Location:
2011/24/AkiR/pong
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • 2011/24/AkiR/pong/pong/pong/Peli.cs

    r2038 r2039  
    99public class Peli : PhysicsGame 
    1010{ 
    11     Vector nopeusYlos = new Vector(0, 500); 
    12     Vector nopeusAlas = new Vector(0, -500); 
     11    Vector nopeusYlos = new Vector(0, 700); 
     12    Vector nopeusAlas = new Vector(0, -700); 
    1313 
    1414    IntMeter pelaajan1Pisteet; 
     
    4141        pallo = new PhysicsObject(60.0, 60.0); 
    4242        Add(pallo); 
    43         pallo.Shape = Shape.Rectangle; 
     43        pallo.Shape = Shape.Circle; 
    4444        pallo.X = -200.0; 
    4545        pallo.Y = 0.0; 
     
    5050        pallo.Restitution = 1.0; 
    5151 
    52         Level.Background.CreateGradient(Color.Black, Color.Red); 
    53         pallo.Color = Color.Black; 
     52        Level.Background.CreateGradient(Color.Black, Color.Black); 
     53        pallo.Color = Color.White; 
    5454        Camera.ZoomToLevel(); 
    5555        AddCollisionHandler(pallo, KasittelePallonTormays); 
     
    8484        maila.Restitution = 1.0; 
    8585        Add(maila); 
    86         maila.Color = Color.Black; 
     86        maila.Color = Color.White; 
    8787        return maila; 
    8888    } 
     
    9393        Keyboard.Listen(Key.Z, ButtonState.Down, AsetaNopeus, "Pelaaja 1: Liikuta mailaa alas", maila1, nopeusAlas); 
    9494        Keyboard.Listen(Key.Z, ButtonState.Released, AsetaNopeus, null, maila1, Vector.Zero); 
    95         Keyboard.Listen(Key.Up, ButtonState.Down, AsetaNopeus, "Pelaaja 2: Liikuta mailaa ylös", maila2, nopeusYlos); 
    96         Keyboard.Listen(Key.Up, ButtonState.Released, AsetaNopeus, null, maila2, Vector.Zero); 
    97         Keyboard.Listen(Key.Down, ButtonState.Down, AsetaNopeus, "Pelaaja 2: Liikuta mailaa alas", maila2, nopeusAlas); 
    98         Keyboard.Listen(Key.Down, ButtonState.Released, AsetaNopeus, null, maila2, Vector.Zero); 
     95        Keyboard.Listen(Key.K, ButtonState.Down, AsetaNopeus, "Pelaaja 2: Liikuta mailaa ylös", maila2, nopeusYlos); 
     96        Keyboard.Listen(Key.K, ButtonState.Released, AsetaNopeus, null, maila2, Vector.Zero); 
     97        Keyboard.Listen(Key.M, ButtonState.Down, AsetaNopeus, "Pelaaja 2: Liikuta mailaa alas", maila2, nopeusAlas); 
     98        Keyboard.Listen(Key.M, ButtonState.Released, AsetaNopeus, null, maila2, Vector.Zero); 
    9999        Keyboard.Listen(Key.F1, ButtonState.Pressed, ShowControlHelp, "Näytä ohjeet"); 
    100100        Keyboard.Listen(Key.Escape, ButtonState.Pressed, Exit, "Poistu"); 
     
    131131        naytto.X = x; 
    132132        naytto.Y = y; 
    133         naytto.TextColor = Color.Green; 
     133        naytto.TextColor = Color.Black; 
    134134        naytto.BorderColor = Level.BackgroundColor; 
    135         naytto.Color = Level.BackgroundColor = Color.LightBlue; 
     135        naytto.Color = Level.BackgroundColor = Color.White; 
    136136        Add(naytto); 
    137137 
Note: See TracChangeset for help on using the changeset viewer.