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 FysiikkaPeli1 : PhysicsGame |
---|
10 | { |
---|
11 | Image mikkokuva = LoadImage("Mikko3"); |
---|
12 | Image taustaKuva = LoadImage("Ruoho4"); |
---|
13 | |
---|
14 | public override void Begin() |
---|
15 | { |
---|
16 | Level.Size = Screen.Size; |
---|
17 | Level.Background.Image = taustaKuva; |
---|
18 | Level.Background.TileToLevel(); |
---|
19 | |
---|
20 | PhysicsObject mikko = new PhysicsObject(70, 47); |
---|
21 | mikko.Image = mikkokuva; |
---|
22 | Add(mikko); |
---|
23 | |
---|
24 | /*GameObject taustaPilvet = new GameObject(Screen.Width, Screen.Height); |
---|
25 | taustaPilvet.Image = taustaKuva; |
---|
26 | Add(taustaPilvet, -3); |
---|
27 | Layers[-3].RelativeTransition = new Vector(0.5, 0.5);*/ |
---|
28 | |
---|
29 | Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); |
---|
30 | } |
---|
31 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.