source: 2011/26/JuhoK/SFN/SFN/SFN/Peli.cs @ 2176

Revision 2176, 885 bytes checked in by jumakall, 9 years ago (diff)

Päivitetty valikon taustakuva.

Line 
1using System;
2using System.Collections.Generic;
3using Jypeli;
4using Jypeli.Assets;
5using Jypeli.Controls;
6using Jypeli.Effects;
7using Jypeli.Widgets;
8
9public class Peli : PhysicsGame
10{
11    Image MenuBackround = LoadImage("MenuBackround");
12    public override void Begin()
13    {
14        Keyboard.Listen(Key.Escape, ButtonState.Released, Exit, null);
15        Mouse.IsCursorVisible = true;
16        CreateMenu();
17    }
18
19    void CreateMenu()
20    {
21        //Set menu backround
22        Level.Background.Image = MenuBackround;
23
24        //Start game button
25        PushButton quit_game = new PushButton("Quit game");
26        quit_game.Clicked += new Action(quit_game_Clicked);
27        quit_game.Position = new Vector(380.0, -50.0);
28        Add(quit_game);
29    }
30
31    void quit_game_Clicked()
32    {
33        //Crediittejä tänne?
34        Exit();
35    }
36}
Note: See TracBrowser for help on using the repository browser.