-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
51 lines (40 loc) · 1.33 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MetalLib;
using MetalLib.GameStructure;
using MetalLib.GameWorld;
using MetalLib.Pencil.Gaming;
using Pencil.Gaming;
using Pencil.Gaming.Audio;
using Pencil.Gaming.Graphics;
using Pencil.Gaming.MathUtils;
using System.Threading;
namespace MiniLD50
{
class Program
{
public static GameLoop MainGameLoop;
public static double TotalTime = 0.0;
public static int ScreenWidth = 640, ScreenHeight = 480;
public static Sound Music;
public static Sound MenuMusic;
static void Main(string[] args)
{
Window2D window = new Window2D(ScreenWidth, ScreenHeight, true, "Pew Pew - VikingStein 2.5D - By Metaldemon", ScreenWidth, ScreenHeight);
MainGameLoop = new GameLoop(new LoadState());
Glfw.SwapInterval(false);
new Thread(_LoadMusic).Start();
MainGameLoop.Start(window);
ContentManager.DisposeAll();
}
private static void _LoadMusic()
{
MenuMusic = new Sound(GameUtils.GetAppPath() + "/content/audio/menu2.ogg");
Music = new Sound(GameUtils.GetAppPath() + "/content/audio/music2.ogg");
Music.Looping = true;
MenuMusic.Looping = true;
}
}
}