MoonWorksTemplate/src/Program.cs

42 lines
839 B
C#
Raw Normal View History

2021-04-04 21:01:40 +00:00
using System;
using System.IO;
using System.Runtime.InteropServices;
using MoonWorks;
namespace ProjectName
{
2022-08-30 05:11:51 +00:00
class Program
{
[DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool SetDllDirectory(string lpPathName);
2021-04-04 21:01:40 +00:00
2022-08-30 05:11:51 +00:00
static void Main(string[] args)
{
WindowCreateInfo windowCreateInfo = new WindowCreateInfo
{
WindowWidth = 1280,
WindowHeight = 720,
WindowTitle = "ProjectName",
ScreenMode = ScreenMode.Windowed
};
2021-04-04 21:01:40 +00:00
2022-08-30 05:11:51 +00:00
FramerateSettings framerateSettings = new FramerateSettings
{
Mode = FramerateMode.Uncapped,
Cap = 60
};
2021-04-04 21:01:40 +00:00
2022-08-30 05:11:51 +00:00
ProjectNameGame game = new ProjectNameGame(
windowCreateInfo,
MoonWorks.Graphics.PresentMode.FIFORelaxed,
framerateSettings,
true
);
game.Run();
}
}
}