Changeset 7711 for 2016/27/KonstantinosK


Ignore:
Timestamp:
2016-07-04 14:52:57 (3 years ago)
Author:
karkaite
Message:
 
Location:
2016/27/KonstantinosK/pong
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • 2016/27/KonstantinosK/pong/pong/pong/obj/x86/Debug/ContentPipeline-{864AD80B-8D03-4992-82A1-A189B430C9BF}.xml

    r7697 r7711  
    99      <BuildConfiguration>Debug</BuildConfiguration> 
    1010      <CompressContent>false</CompressContent> 
    11       <RootDirectory>C:\MyTemp\konstak\pong\pong\pongContent\</RootDirectory> 
    12       <LoggerRootDirectory>C:\MyTemp\konstak\pong\pong\pong\</LoggerRootDirectory> 
    13       <IntermediateDirectory>C:\MyTemp\konstak\pong\pong\pong\obj\x86\Debug\</IntermediateDirectory> 
    14       <OutputDirectory>C:\MyTemp\konstak\pong\pong\pong\bin\x86\Debug\Content\</OutputDirectory> 
     11      <RootDirectory>C:\MyTemp\KonstantinosK\pong\pong\pongContent\</RootDirectory> 
     12      <LoggerRootDirectory>C:\MyTemp\KonstantinosK\pong\pong\pong\</LoggerRootDirectory> 
     13      <IntermediateDirectory>C:\MyTemp\KonstantinosK\pong\pong\pong\obj\x86\Debug\</IntermediateDirectory> 
     14      <OutputDirectory>C:\MyTemp\KonstantinosK\pong\pong\pong\bin\x86\Debug\Content\</OutputDirectory> 
    1515    </Settings> 
    1616    <Assemblies> 
  • 2016/27/KonstantinosK/pong/pong/pong/obj/x86/Debug/pong.csproj.FileListAbsolute.txt

    r7697 r7711  
    77C:\MyTemp\konstak\pong\pong\pong\obj\x86\Debug\pong.exe 
    88C:\MyTemp\konstak\pong\pong\pong\obj\x86\Debug\pong.pdb 
     9C:\MyTemp\KonstantinosK\pong\pong\pong\bin\x86\Debug\pong.exe 
     10C:\MyTemp\KonstantinosK\pong\pong\pong\bin\x86\Debug\pong.pdb 
     11C:\MyTemp\KonstantinosK\pong\pong\pong\bin\x86\Debug\Jypeli.dll 
     12C:\MyTemp\KonstantinosK\pong\pong\pong\bin\x86\Debug\Jypeli.xml 
     13C:\MyTemp\KonstantinosK\pong\pong\pong\obj\x86\Debug\pong.csprojResolveAssemblyReference.cache 
     14C:\MyTemp\KonstantinosK\pong\pong\pong\obj\x86\Debug\Microsoft.Xna.Framework.RuntimeProfile.txt 
     15C:\MyTemp\KonstantinosK\pong\pong\pong\obj\x86\Debug\pong.exe 
     16C:\MyTemp\KonstantinosK\pong\pong\pong\obj\x86\Debug\pong.pdb 
  • 2016/27/KonstantinosK/pong/pong/pong/pong.cs

    r7697 r7711  
    1010{ 
    1111    PhysicsObject pallo; 
     12    Vector nopeusylos = new Vector(0, 200); 
     13    Vector nopeusalas = new Vector(0,-200); 
     14 
     15 
     16    PhysicsObject maila1; 
     17    PhysicsObject maila2; 
     18 
    1219    public override void Begin() 
    1320    { 
     
    1522        LuoKentta(); 
    1623        aloitapeli(); 
    17         PhoneBackButton.Listen(ConfirmExit, "Lopeta peli"); 
    18         Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 
     24        AsetaOhjaimet(); 
     25         
    1926    } 
    2027    void LuoKentta() { 
     
    2431        pallo.Shape = Shape.Circle; 
    2532        Add(pallo); 
    26  
    27         PhysicsObject maila = PhysicsObject.CreateStaticObject(20.0, 100.0); 
    28         maila.Shape = Shape.Rectangle; 
    29         maila.X = Level.Left + 20.0; 
    30         maila.Y = 0.0; 
    31         maila.Restitution = 1.0; 
    32         Add(maila); 
    33  
     33     maila1 =   LuoMaila(Level.Left + 20.0, 0.0); 
     34     maila2 =   LuoMaila(Level.Right - 20.0, 0.0); 
    3435 
    3536        Vector impulssi = new Vector(500.0, 0.0); 
     
    3738        Level.CreateBorders(1.0, false); 
    3839        pallo.Restitution = 1.0; 
    39         Level.Background.Color = Color.Green; 
     40        Level.Background.Color = Color.DarkGreen; 
    4041        Camera.ZoomToLevel(); 
    4142    } 
     
    4344    { 
    4445 
     46 
    4547    } 
     48PhysicsObject  LuoMaila(double x, double y) 
     49    { 
     50        PhysicsObject maila = PhysicsObject.CreateStaticObject(20.0, 100.0); 
     51        maila.Shape = Shape.Rectangle; 
     52        maila.X = x; 
     53        maila.Y = y; 
     54        maila.Restitution = 1.0; 
     55        Add(maila); 
     56        return maila; 
     57    } 
     58    void AsetaOhjaimet() 
     59    { 
     60        Keyboard.Listen(Key.A, ButtonState.Down, AsetaNopeus, "pelaaja 1: liikuta mailaa ylös", maila1, nopeusylos); 
     61        Keyboard.Listen(Key.A, ButtonState.Released, AsetaNopeus, null, maila1, Vector.Zero); 
     62        Keyboard.Listen(Key.Z, ButtonState.Down, AsetaNopeus, "pelaaja 1: liikuta mailaa alas", maila1, nopeusalas); 
     63        Keyboard.Listen(Key.Z, ButtonState.Released, AsetaNopeus, null, maila1, Vector.Zero); 
     64        Keyboard.Listen(Key.Up, ButtonState.Down, AsetaNopeus, "pelaaja 2:liikuta maila ylös", maila2, nopeusylos); 
     65        Keyboard.Listen(Key.Up, ButtonState.Released, AsetaNopeus, null, maila2, Vector.Zero); 
     66        Keyboard.Listen(Key.Down, ButtonState.Down, AsetaNopeus, "pelaaja 2: liikuta mailaa ylös", maila2, nopeusalas); 
     67        Keyboard.Listen(Key.Down, ButtonState.Released, AsetaNopeus, null, maila2, Vector.Zero); 
     68        PhoneBackButton.Listen(ConfirmExit, "Lopeta peli"); 
     69        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 
     70    } 
     71 
     72    void AsetaNopeus(PhysicsObject maila, Vector nopeus) 
     73    { 
     74        maila.Velocity = nopeus; 
     75    } 
     76 
    4677} 
     78 
  • 2016/27/KonstantinosK/pong/pong/pongContent/obj/x86/Debug/pongContent.contentproj.FileListAbsolute.txt

    r7697 r7711  
    11C:\MyTemp\konstak\pong\pong\pongContent\obj\x86\Debug\pongContent.contentprojResolveAssemblyReference.cache 
     2C:\MyTemp\KonstantinosK\pong\pong\pongContent\obj\x86\Debug\pongContent.contentprojResolveAssemblyReference.cache 
Note: See TracChangeset for help on using the changeset viewer.