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 Proto236b : PhysicsGame //true survivor |
---|
10 | { |
---|
11 | Image[] images = new Image[1]; |
---|
12 | void AssignKeys() |
---|
13 | { |
---|
14 | Keyboard.Listen(Key.Escape, ButtonState.Down, Exit, "Lopeta Peli"); |
---|
15 | } |
---|
16 | void LoadAllImages() |
---|
17 | { |
---|
18 | images[0] = LoadImage("graphics/backgrounds/space_background"); |
---|
19 | } |
---|
20 | void LoadLevel(int level) |
---|
21 | { |
---|
22 | ClearAll(); |
---|
23 | AssignKeys(); |
---|
24 | LevelFromImage("graphics/levels/" + level); |
---|
25 | } |
---|
26 | void LevelFromImage(string levelName) |
---|
27 | { |
---|
28 | ColorTileMap tileMap = ColorTileMap.FromLevelAsset(levelName); |
---|
29 | tileMap.SetTileMethod(Color.FromHexCode("000000"), createTile, "seina"); |
---|
30 | tileMap.Execute(); |
---|
31 | } |
---|
32 | void createTile(Vector position, double w, double h, string type) |
---|
33 | { |
---|
34 | |
---|
35 | } |
---|
36 | public override void Begin() |
---|
37 | { |
---|
38 | // TODO: Kirjoita peli tähän |
---|
39 | LoadAllImages(); |
---|
40 | LoadLevel(0); |
---|
41 | } |
---|
42 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.