Revision 3669,
1001 bytes
checked in by vivasuom, 9 years ago
(diff) |
Talletus.
|
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 KuvaPakkaus : PhysicsGame |
---|
10 | { |
---|
11 | Image[] ajKuvat = LoadImages("Aj1", "Aj2", "Aj3", "Aj4", "Aj5", "Aj6", "Aj7", "Aj8", "Aj9", "aj10"); |
---|
12 | |
---|
13 | public override void Begin() |
---|
14 | { |
---|
15 | Level.CreateBorders(); |
---|
16 | Camera.ZoomToLevel(); |
---|
17 | Level.BackgroundColor = (new Color(28, 20, 255)); |
---|
18 | |
---|
19 | PhoneBackButton.Listen(ConfirmExit, "Lopeta peli"); |
---|
20 | Keyboard.Listen(Key.Enter, ButtonState.Pressed, VaihdaSatunnainenKuva, "Vaihtaa kuvan"); |
---|
21 | Keyboard.Listen(Key.Enter, ButtonState.Pressed, VaihdaTiettyKuva); |
---|
22 | } |
---|
23 | |
---|
24 | void VaihdaSatunnainenKuva() |
---|
25 | { |
---|
26 | ClearGameObjects(); |
---|
27 | PhysicsObject Kuutio = new PhysicsObject(800, 800); |
---|
28 | Image satunnainenKuva = RandomGen.SelectOne<Image>(ajKuvat); |
---|
29 | Kuutio.Image = satunnainenKuva; |
---|
30 | Add(Kuutio, 1); |
---|
31 | } |
---|
32 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.