Revision 8840,
1.1 KB
checked in by npo17_42, 4 years ago
(diff) |
peli aloitettu.
|
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 OK : Game |
---|
10 | { |
---|
11 | PhysicsObject command; |
---|
12 | PhysicsObject feed; |
---|
13 | public override void Begin() |
---|
14 | { |
---|
15 | LuoAlue(); |
---|
16 | Kontrollit(); |
---|
17 | |
---|
18 | Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); |
---|
19 | } |
---|
20 | |
---|
21 | void LuoAlue() |
---|
22 | { |
---|
23 | Level.Background.Color = Color.White; |
---|
24 | |
---|
25 | command = new PhysicsObject(400.0, 300.0); |
---|
26 | command.Shape = Shape.Rectangle; |
---|
27 | command.Color = Color.Black; |
---|
28 | command.X = 100.00; |
---|
29 | command.Y = -250.00; |
---|
30 | Add(command); |
---|
31 | |
---|
32 | feed = new PhysicsObject(700.00, 300.00); |
---|
33 | feed.Shape = Shape.Rectangle; |
---|
34 | feed.Color = Color.Black; |
---|
35 | feed.X = -500.00; |
---|
36 | feed.Y = -250.00; |
---|
37 | Add(feed); |
---|
38 | |
---|
39 | portrait = new PhysicsObject(100.00, 300.00); |
---|
40 | } |
---|
41 | |
---|
42 | void Kontrollit () |
---|
43 | { Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); } |
---|
44 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.