Changeset 2200 for 2011


Ignore:
Timestamp:
2011-06-28 11:05:46 (8 years ago)
Author:
vilmarju
Message:

Talletus.

Location:
2011/26/VilleK/ponggi
Files:
8 added
2 edited

Legend:

Unmodified
Added
Removed
  • 2011/26/VilleK/ponggi/ponggi/ponggi/Peli.cs

    r2193 r2200  
    88 
    99public class Peli : PhysicsGame 
    10 { 
     10{Vector nopeusYlos = new Vector( 0, 200 ); 
     11    Vector nopeusAlas = new Vector( 0, -200 ); 
     12 
    1113    PhysicsObject pallo; 
     14    PhysicsObject maila1; 
     15    PhysicsObject maila2; 
    1216 
    1317 
     
    3236        pallo.Restitution = 1.0; 
    3337        Camera.ZoomToLevel(); 
    34  
     38        MessageDisplay.TextColor = Color.MediumBlue; 
    3539        Level.BackgroundColor = Color.Black; 
    36         LuoMaila(Level.Left + 20.0, 0.0); 
    37         LuoMaila(Level.Right - 20.0, 0.0); 
     40        maila1 = LuoMaila(Level.Left + 20.0, 0.0); 
     41        maila2 = LuoMaila(Level.Right - 20.0, 0.0); 
    3842    } 
    3943    void AsetaOhjaimet() 
     
    4145         { 
    4246             Keyboard.Listen(Key.Escape, ButtonState.Pressed, Exit, "Poistu"); 
    43              Keyboard.Listen( Key.a, ButtonState.Down liiikutamailaaylös, ); 
    44              A, ButtonState.Released, PysaytaMaila, null ); 
     47             Keyboard.Listen( Key.A, ButtonState.Down, AsetaNopeus, "Pelaaja 1: Liikuta mailaa ylös",maila1,nopeusYlos); 
     48             Keyboard.Listen( Key.A, ButtonState.Released, AsetaNopeus, null,maila1,Vector.Zero ); 
     49    Keyboard.Listen( Key.Z,      ButtonState.Down,     AsetaNopeus,     "Pelaaja 1: Liikuta mailaa alas", maila1, nopeusAlas ); 
     50    Keyboard.Listen( Key.Z,      ButtonState.Released, AsetaNopeus,     null,                             maila1, Vector.Zero ); 
     51 
     52    Keyboard.Listen( Key.Up,     ButtonState.Down,     AsetaNopeus,     "Pelaaja 2: Liikuta mailaa ylös", maila2, nopeusYlos ); 
     53    Keyboard.Listen( Key.Up,     ButtonState.Released, AsetaNopeus,     null,                             maila2, Vector.Zero ); 
     54    Keyboard.Listen( Key.Down,   ButtonState.Down,     AsetaNopeus,     "Pelaaja 2: Liikuta mailaa alas", maila2, nopeusAlas ); 
     55    Keyboard.Listen( Key.Down,   ButtonState.Released, AsetaNopeus,     null,                             maila2, Vector.Zero ); 
     56 
     57    Keyboard.Listen( Key.F1,     ButtonState.Pressed,  ShowControlHelp, "Näytä ohjeet" ); 
    4558 
    4659         } 
     
    5063} 
    5164 
    52     void LuoMaila(double x, double y) 
     65    PhysicsObject LuoMaila(double x, double y) 
    5366    { 
    5467        PhysicsObject maila = PhysicsObject.CreateStaticObject(20.0, 100.0); 
    5568        maila.Shape = Shape.Rectangle; 
    56         maila1.X = x; 
    57         maila2.Y = y; 
     69        maila.X = x; 
     70        maila.Y = y; 
    5871        maila.Restitution = 1.0; 
    5972        Add(maila); 
     73        return maila; 
     74 
    6075    } 
    6176    void aloita() 
    6277    { 
    6378 
    64         Vector impulssi = new Vector(500.0, 0.0); 
     79        Vector impulssi = new Vector(800.0, 1.0); 
    6580        pallo.Hit(impulssi); 
    6681    } 
  • 2011/26/VilleK/ponggi/ponggi/ponggi/obj/x86/Debug/ponggi.csproj.FileListAbsolute.txt

    r2193 r2200  
    11C:\MyTemp\VilleK\ponggi\ponggi\ponggi\obj\x86\Debug\ResolveAssemblyReference.cache 
    22C:\MyTemp\VilleK\ponggi\ponggi\ponggi\obj\x86\Debug\Microsoft.Xna.Framework.RuntimeProfile.txt 
     3C:\MyTemp\VilleK\ponggi\ponggi\ponggi\bin\x86\Debug\ponggi.exe 
     4C:\MyTemp\VilleK\ponggi\ponggi\ponggi\bin\x86\Debug\ponggi.pdb 
     5C:\MyTemp\VilleK\ponggi\ponggi\ponggi\bin\x86\Debug\Jypeli4.dll 
     6C:\MyTemp\VilleK\ponggi\ponggi\ponggi\bin\x86\Debug\Jypeli4.xml 
     7C:\MyTemp\VilleK\ponggi\ponggi\ponggi\obj\x86\Debug\ponggi.exe 
     8C:\MyTemp\VilleK\ponggi\ponggi\ponggi\obj\x86\Debug\ponggi.pdb 
Note: See TracChangeset for help on using the changeset viewer.