Changeset 8632 for 2017/24


Ignore:
Timestamp:
2017-06-14 11:21:55 (2 years ago)
Author:
npo17_13
Message:
 
Location:
2017/24/SebastianH/JumpingAdventure
Files:
6 added
3 edited

Legend:

Unmodified
Added
Removed
  • 2017/24/SebastianH/JumpingAdventure/JumpingAdventure/JumpingAdventure/JumpingAdventure.cs

    r8618 r8632  
    99public class JumpingAdventure : PhysicsGame 
    1010{ 
     11    PhysicsObject janis; 
    1112    public override void Begin() 
    1213    { 
    13         PhysicsObject Jänis = new PhysicsObject(50.0, 50.0, Shape.Pentagon); 
    14         Jänis.X = 200.0; 
    15         Jänis.Y = 400.0; 
    16         Add (Jänis); 
     14        janis = new PhysicsObject(10.0, 60.0, Shape.Ellipse); 
     15        janis.X = 200.0; 
     16        janis.Y = 400.0; 
     17        janis.Color = Color.Beige; 
     18        Add (janis); 
    1719 
     20        Level.Background.CreateStars(1000000); 
    1821 
     22        Keyboard.Listen(Key.Left, ButtonState.Down, LiikutaPelaajaa, null, new Vector(-1000, 0)); 
     23        Keyboard.Listen(Key.Left, ButtonState.Released, PysaytaPelaaja, null, new Vector(0, 0)); 
     24        Keyboard.Listen(Key.Right, ButtonState.Down, LiikutaPelaajaa, null, new Vector(1000, 0)); 
     25        Keyboard.Listen(Key.Right, ButtonState.Released, PysaytaPelaaja, null, new Vector(0, 0)); 
     26        Keyboard.Listen(Key.Up, ButtonState.Down, LiikutaPelaajaa, null, new Vector(0, 1000)); 
     27        Keyboard.Listen(Key.Up, ButtonState.Released, PysaytaPelaaja, null, new Vector(0, 0)); 
     28        Keyboard.Listen(Key.Down, ButtonState.Down, LiikutaPelaajaa, null, new Vector(0, -1000)); 
     29        Keyboard.Listen(Key.Down, ButtonState.Released, PysaytaPelaaja, null, new Vector(0, 0)); 
    1930        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 
    2031    } 
     32    void LiikutaPelaajaa(Vector vektori) 
     33    { 
     34        janis.Push(vektori); 
     35    } 
     36    void PysaytaPelaaja(Vector vektori) 
     37    { 
     38        janis.Velocity = Vector.Zero; 
     39    } 
    2140} 
  • 2017/24/SebastianH/JumpingAdventure/JumpingAdventure/JumpingAdventure/obj/x86/Debug/JumpingAdventure.csproj.FileListAbsolute.txt

    r8618 r8632  
    11C:\MyTemp\SebastianH\JumpingAdventure\JumpingAdventure\JumpingAdventure\obj\x86\Debug\JumpingAdventure.csprojResolveAssemblyReference.cache 
    22C:\MyTemp\SebastianH\JumpingAdventure\JumpingAdventure\JumpingAdventure\obj\x86\Debug\Microsoft.Xna.Framework.RuntimeProfile.txt 
     3C:\MyTemp\SebastianH\JumpingAdventure\JumpingAdventure\JumpingAdventure\bin\x86\Debug\JumpingAdventure.exe 
     4C:\MyTemp\SebastianH\JumpingAdventure\JumpingAdventure\JumpingAdventure\bin\x86\Debug\JumpingAdventure.pdb 
     5C:\MyTemp\SebastianH\JumpingAdventure\JumpingAdventure\JumpingAdventure\bin\x86\Debug\Jypeli.dll 
     6C:\MyTemp\SebastianH\JumpingAdventure\JumpingAdventure\JumpingAdventure\bin\x86\Debug\Jypeli.xml 
     7C:\MyTemp\SebastianH\JumpingAdventure\JumpingAdventure\JumpingAdventure\obj\x86\Debug\JumpingAdventure.exe 
     8C:\MyTemp\SebastianH\JumpingAdventure\JumpingAdventure\JumpingAdventure\obj\x86\Debug\JumpingAdventure.pdb 
Note: See TracChangeset for help on using the changeset viewer.