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 Taikakirja : PhysicsGame |
---|
10 | { |
---|
11 | public override void Begin() |
---|
12 | { |
---|
13 | // TODO: Kirjoita ohjelmakoodisi tähän |
---|
14 | AlkuValikko(); |
---|
15 | Ohjaimet(); |
---|
16 | |
---|
17 | } |
---|
18 | void Ohjaimet() |
---|
19 | { |
---|
20 | Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); |
---|
21 | } |
---|
22 | void AlkuValikko() |
---|
23 | { |
---|
24 | MultiSelectWindow alkuValikko = new MultiSelectWindow("Taikakirja", "Pelaa", "Lopeta"); |
---|
25 | Add(alkuValikko); |
---|
26 | alkuValikko.AddItemHandler(0, Aloitus); |
---|
27 | alkuValikko.AddItemHandler(1, Lopeta); |
---|
28 | } |
---|
29 | void Aloitus() |
---|
30 | { |
---|
31 | |
---|
32 | } |
---|
33 | |
---|
34 | void Lopeta() |
---|
35 | { |
---|
36 | ConfirmExit(); |
---|
37 | } |
---|
38 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.