Add project files.
This commit is contained in:
17
FreedomFighter/Program.cs
Normal file
17
FreedomFighter/Program.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
|
||||
using var game = new FreedomFighter.Game1();
|
||||
// debug aid: --shot <file> [frames] renders, saves the backbuffer to a PNG, and exits
|
||||
var cmdArgs = Environment.GetCommandLineArgs();
|
||||
for (int i = 1; i < cmdArgs.Length - 1; i++)
|
||||
{
|
||||
if (cmdArgs[i] == "--shot")
|
||||
{
|
||||
game.ShotFile = cmdArgs[i + 1];
|
||||
if (i + 2 < cmdArgs.Length && int.TryParse(cmdArgs[i + 2], out int frames))
|
||||
game.ShotFrames = frames;
|
||||
}
|
||||
if (cmdArgs[i] == "--level" && int.TryParse(cmdArgs[i + 1], out int level))
|
||||
game.StartLevel = level;
|
||||
}
|
||||
game.Run();
|
||||
Reference in New Issue
Block a user