source: 2013/27/TeemuM/Game/Game/Game/Game.cs @ 4360

Revision 4360, 1.2 KB checked in by janiemit, 8 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 G : PhysicsGame
10{
11    public static G game;
12    public Image playerImage = LoadImage("Player");
13
14    public override void Begin()
15    {
16        game = this;
17
18        Player pelaaja = new Player(this, 50, 50);
19        Add(pelaaja);
20
21        ScoreMeter();
22
23        PhoneBackButton.Listen(Exit, "Lopeta peli");
24        Keyboard.Listen(Key.Escape, ButtonState.Pressed, Exit, "Lopeta peli");
25
26        Mouse.IsCursorVisible = true;
27    }
28
29    IntMeter scoreboard;
30
31    void ScoreMeter()
32    {
33        scoreboard = new IntMeter(0);
34        scoreboard.AddOverTime(100, 1);
35
36        Label ScoreScreen = new Label();
37        ScoreScreen.X = 0;
38        ScoreScreen.Y = Screen.Bottom + 100;
39        ScoreScreen.TextColor = Color.Black;
40        ScoreScreen.Color = Color.White;
41        ScoreScreen.BindTo(scoreboard);
42        Add(ScoreScreen);
43    }
44
45    protected override void Update(Microsoft.Xna.Framework.GameTime gameTime)
46    {
47
48        base.Update(gameTime);
49    }
50}
Note: See TracBrowser for help on using the repository browser.