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 Lentokone : PhysicsGame |
---|
10 | { |
---|
11 | Image maisema = LoadImage("havutausta"); |
---|
12 | Image havusaurus = LoadImage("havusaurus"); |
---|
13 | public override void Begin() |
---|
14 | { |
---|
15 | luokentta(); |
---|
16 | luohavusaurus(); |
---|
17 | |
---|
18 | PhoneBackButton.Listen(ConfirmExit, "Lopeta peli"); |
---|
19 | Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); |
---|
20 | } |
---|
21 | void luokentta() |
---|
22 | { |
---|
23 | Level.Width = 1920; |
---|
24 | Level.Height = 1080; |
---|
25 | Level.BackgroundColor = Color.Red; |
---|
26 | Level.Background.Image = maisema; |
---|
27 | Level.Background.FitToLevel(); |
---|
28 | } |
---|
29 | void luohavusaurus() |
---|
30 | { |
---|
31 | PhysicsObject pelaaja = new PhysicsObject(235.0, 283.0); |
---|
32 | pelaaja.Shape = Shape.FromImage(havusaurus); |
---|
33 | pelaaja.Image = havusaurus; |
---|
34 | Add(pelaaja); |
---|
35 | |
---|
36 | } |
---|
37 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.