Source

SharpHammer / Examples / Program.cs

Full commit
using System;
using SharpHammer;

namespace Examples
{
	class Program
	{
		private static void Main(string[] args)
		{
			Core.Init();
			Log.ConsoleOutput = true;
			//Log.SetFileOutput("log.txt");
			Config cfg;
			try {
				cfg = Config.FromFile("setting.json");
			} catch {
				cfg = Config.Default;
			}
			Engine eng = new Engine("Hello World!", cfg);
			eng.OnUpdate += eng_OnUpdate;

			Scene scn = new Scene("test");
			eng.ActiveScene = scn;
			Camera cam = new Camera(new Vec4(0f, 1f, -5f, 1f), new Vec4(0f, 1f, 1f, 1f));

			eng.ActiveCamera = cam;

			eng.Run();

			eng.Dispose();
			cfg.Dispose();
			Core.Release();
		}

		static void eng_OnUpdate()
		{

		}
	}
}