Changeset 3334 for 2012/26


Ignore:
Timestamp:
2012-06-28 15:06:42 (7 years ago)
Author:
elalylon
Message:

Talletus.

Location:
2012/26/EliasY/test1
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • 2012/26/EliasY/test1/test1/test1/test1.cs

    r3318 r3334  
    2929        Camera.ZoomFactor = 1.7; 
    3030        /*todo: 
    31          * mapin parantelu 
     31         * mapin teko 
    3232         * vihujen AI:n debuggaus 
    3333         */ 
     
    5252        Keyboard.Listen(Key.Right, ButtonState.Down, Kaanny, null, -2.0); 
    5353 
    54         Keyboard.Listen(Key.W, ButtonState.Released, Pysayta, null, new Vector(1, 0)); 
    55         Keyboard.Listen(Key.A, ButtonState.Released, Pysayta, null, new Vector(0, 1)); 
    56         Keyboard.Listen(Key.S, ButtonState.Released, Pysayta, null, new Vector(1, 0)); 
    57         Keyboard.Listen(Key.D, ButtonState.Released, Pysayta, null, new Vector(0, 1)); 
     54        Keyboard.Listen(Key.W, ButtonState.Released, PysaytaY, null, new Vector(1, 0)); 
     55        Keyboard.Listen(Key.A, ButtonState.Released, PysaytaY, null, new Vector(0, 1)); 
     56        Keyboard.Listen(Key.S, ButtonState.Released, PysaytaX, null, new Vector(1, 0)); 
     57        Keyboard.Listen(Key.D, ButtonState.Released, PysaytaX, null, new Vector(0, 1)); 
    5858 
    5959        Keyboard.Listen(Key.Left, ButtonState.Released, LopetaKaantyminen, null); 
     
    113113    } 
    114114 
    115     void Pysayta(Vector nopeusKerroin) 
    116     { 
    117         pelaaja.Velocity = Vector.ComponentProduct(nopeusKerroin, pelaaja.Velocity); 
     115    void PysaytaX(Vector nopeusKerroin) 
     116    { 
     117        //pelaaja.Velocity = Vector.ComponentProduct(nopeusKerroin, pelaaja.Velocity); 
     118        pelaaja.StopHorizontal(); 
     119    } 
     120 
     121    void PysaytaY(Vector nopeusKerroin) 
     122    { 
     123        //pelaaja.Velocity = Vector.ComponentProduct(nopeusKerroin, pelaaja.Velocity); 
     124        pelaaja.StopVertical(); 
    118125    } 
    119126 
Note: See TracChangeset for help on using the changeset viewer.