source: 2014/27/AleksanteriV/Protokolla236TrueSurvivor/Protokolla236TrueSurvivor/Protokolla236TrueSurvivor/Protokolla236TrueSurvivor.cs @ 5216

Revision 5216, 921 bytes checked in by mijoilmo, 7 years ago (diff)
Line 
1using System;
2using System.Collections.Generic;
3using Jypeli;
4using Jypeli.Assets;
5using Jypeli.Controls;
6using Jypeli.Effects;
7using Jypeli.Widgets;
8
9public 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.Execute();
30    }
31    public override void Begin()
32    {
33        // TODO: Kirjoita peli tähän
34        LoadAllImages();
35        LoadLevel(0);
36    }
37}
Note: See TracBrowser for help on using the repository browser.