Line | |
---|
1 | using System; |
---|
2 | using System.Collections.Generic; |
---|
3 | using Jypeli; |
---|
4 | using Jypeli.Assets; |
---|
5 | using Jypeli.Controls; |
---|
6 | using Jypeli.Effects; |
---|
7 | using Jypeli.Widgets; |
---|
8 | |
---|
9 | public class Peli : PhysicsGame |
---|
10 | { |
---|
11 | public override void Begin() |
---|
12 | { |
---|
13 | Luokentta(); |
---|
14 | AsetaOhjaimet(); |
---|
15 | } |
---|
16 | void AsetaOhjaimet() |
---|
17 | { |
---|
18 | Keyboard.Listen(Key.Escape, ButtonState.Pressed, Exit, "Poistu"); |
---|
19 | Keyboard.Listen(Key.F1, ButtonState.Pressed, ShowControlHelp, "Näytä ohjeet"); |
---|
20 | Keyboard.Listen(Key.Up, ButtonState.Down, liikutapelaajaa1, "liikutapelaajaa1"); |
---|
21 | Keyboard.Listen(Key.Down, ButtonState.Down, liikutapelaajaa1, "liikutapelaajaa1"); |
---|
22 | Keyboard.Listen(Key.Right, ButtonState.Down, liikutapelaajaa1, "liikutapelaajaa1"); |
---|
23 | Keyboard.Listen(Key.Left, ButtonState.Down, liikutapelaajaa1, "liikutapelaajaa1"); |
---|
24 | } |
---|
25 | |
---|
26 | void Luokentta() |
---|
27 | { |
---|
28 | PhysicsObject loota = new PhysicsObject(40.0, 40.0); |
---|
29 | loota.Shape = Shape.Star; |
---|
30 | Add(loota); |
---|
31 | //PhysicsObject pallo = new PhysicsObject(100.0, 100.0); |
---|
32 | //Add(pallo); |
---|
33 | //pallo.Shape = Shape.Circle; |
---|
34 | } |
---|
35 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.