source: 2011/23/vihakuli/asd.txt @ 2053

Revision 1740, 780 bytes checked in by vihakuli, 8 years ago (diff)
Line 
1Keyboard.Listen( Key.Up, ButtonState.Down, AsetaNopeus,     "Pelaaja 2: Liikuta mailaa ylös", maila2, nopeusYlos );
2    Keyboard.Listen( Key.Up, ButtonState.Released, AsetaNopeus, null, maila2, Vector.Zero );
3    Keyboard.Listen( Key.Down, ButtonState.Down, AsetaNopeus, "Pelaaja 2: Liikuta mailaa alas", maila2, nopeusAlas );
4    Keyboard.Listen( Key.Down, ButtonState.Released, AsetaNopeus, null, maila2, Vector.Zero );
5
6
7if ((nopeus.Y > 0) && (maila.Top > Level.Top))
8        {
9            maila.Velocity = Vector.Zero;
10            return;
11        }
12
13        if ((nopeus.Y < 0) && (maila.Bottom < Level.Bottom))
14        {
15            maila.Velocity = Vector.Zero;
16            return;
17        }
18
19
20Vector nopeus = Vector.Zero;
21        maila.Velocity = nopeus;
Note: See TracBrowser for help on using the repository browser.