Changeset 8162 for 2016/30/EeroP


Ignore:
Timestamp:
2016-07-27 14:39:12 (3 years ago)
Author:
eeanpulk
Message:

Lisäsin reunoja

Location:
2016/30/EeroP/NinjaInTheDarkLight/NinjaInTheDarkLight/NinjaInTheDarkLight
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • 2016/30/EeroP/NinjaInTheDarkLight/NinjaInTheDarkLight/NinjaInTheDarkLight/NinjaInTheDarkLight.cs

    r8156 r8162  
    1919    PhysicsObject lattia; 
    2020    PhysicsObject tappolattia; 
     21    PhysicsObject ylaReuna; 
     22    PhysicsObject oikeaReuna; 
     23    PhysicsObject vasenReuna; 
     24     
    2125 
    2226 
     
    7074    void LuoKentta() 
    7175    { 
    72         Level.CreateLeftBorder(0.0, true); 
    73         Level.CreateRightBorder(0.0, true); 
    74         Level.CreateTopBorder(0.0, true); 
     76        vasenReuna = PhysicsObject.CreateStaticObject(75.0, Level.Height); 
     77        Add(vasenReuna); 
     78        vasenReuna.Right = Level.Left; 
     79        oikeaReuna = PhysicsObject.CreateStaticObject(75.0, Level.Height); 
     80        Add(oikeaReuna); 
     81        oikeaReuna.Left = Level.Right; 
     82        ylaReuna = PhysicsObject.CreateStaticObject(Level.Width, 75.0); 
     83        Add(ylaReuna); 
     84        ylaReuna.Top = Level.Top; 
    7585        tappolattia = Level.CreateBottomBorder(0.0, true); 
    7686        tappolattia.Tag = "tappolattia"; 
     
    8797        Keyboard.Listen(Key.P, ButtonState.Pressed, Pause, "Pysäytä peli"); 
    8898        Keyboard.Listen(Key.Space, ButtonState.Pressed, Hyppy, "Hyppää", ninja, 550.0); 
    89         Keyboard.Listen(Key.L, ButtonState.Down, SyoksyS, "Syöksy sivulle", ninja, 2000.0); 
     99        Keyboard.Listen(Key.LeftShift, ButtonState.Down, SyoksyS, "Syöksy sivulle", ninja, 2000.0); 
    90100        Keyboard.Listen(Key.S, ButtonState.Down, SyoksyA, "Syöksy alas", ninja, 750.0); 
    91101        Keyboard.Listen(Key.F1, ButtonState.Pressed, ShowControlHelp, "Näytä ohjeet"); 
Note: See TracChangeset for help on using the changeset viewer.