source: 2012/27/DenisZ/TheDungeonGame/TheDungeonGame/TheDungeonGame/TheDungeonGame.cs @ 3477

Revision 3477, 1.0 KB checked in by dezhidki, 8 years ago (diff)

Talletus.

Line 
1using System;
2using System.Collections.Generic;
3using Jypeli;
4using Jypeli.Assets;
5using Jypeli.Controls;
6using Jypeli.Effects;
7using Jypeli.Widgets;
8using MathHelper;
9using Entity;
10using Rooms;
11
12public class TheDungeonGame : PhysicsGame
13{
14    public const double ROOMWIDTH = 850;
15    public const double ROOMHEIGHT = 500;
16    private Player player;
17
18    public override void Begin()
19    {
20        IsMouseVisible = true;
21        SetWindowSize(800, 600);
22        Level.Width = 100000;
23        Level.Height = 100000;
24        Level.CreateBorders();
25        Camera.Zoom(0.8);
26
27        TestRoom testroom = new TestRoom(this,new Vector(-460, 300), new Vector(ROOMWIDTH, ROOMHEIGHT), 70);
28        testroom.buildLevel();
29
30        player = new Player(Vector.Zero);
31        Add(player, 1);
32
33        Keyboard.Listen(Key.Escape, ButtonState.Pressed, Exit, "Lopeta peli");   
34    }
35
36    protected override void Update(Time time)
37    {
38        player.Update(time);
39        base.Update(time);
40    }
41}
Note: See TracBrowser for help on using the repository browser.