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 YouCombat : PhysicsGame |
---|
10 | { |
---|
11 | PhysicsObject rauski; |
---|
12 | PhysicsObject vihollinen; |
---|
13 | |
---|
14 | public override void Begin() |
---|
15 | { |
---|
16 | // Tee Maisema ja |
---|
17 | |
---|
18 | Hahmot(); |
---|
19 | |
---|
20 | PhoneBackButton.Listen(ConfirmExit, "Lopeta peli"); |
---|
21 | Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); |
---|
22 | } |
---|
23 | |
---|
24 | void Hahmot() |
---|
25 | { |
---|
26 | PhysicsObject rauski = new PhysicsObject(50, 80); |
---|
27 | PhysicsObject vihollinen = new PhysicsObject(50, 80); |
---|
28 | |
---|
29 | Add(rauski); |
---|
30 | Add(vihollinen); |
---|
31 | |
---|
32 | |
---|
33 | |
---|
34 | |
---|
35 | rauski.Shape = Shape.Heart; |
---|
36 | |
---|
37 | |
---|
38 | |
---|
39 | } |
---|
40 | |
---|
41 | |
---|
42 | |
---|
43 | |
---|
44 | |
---|
45 | |
---|
46 | |
---|
47 | |
---|
48 | void VihollinenKuolee() |
---|
49 | { |
---|
50 | |
---|
51 | vihollinen.Destroy(); |
---|
52 | |
---|
53 | |
---|
54 | } |
---|
55 | |
---|
56 | |
---|
57 | |
---|
58 | } |
---|
59 | |
---|
Note: See
TracBrowser
for help on using the repository browser.