Files
glitchy-engine-beef/Sandbox/src/SandboxApp.bf
T

42 lines
736 B
Beef

using System;
using GlitchyEngine;
using GlitchyEngine.Events;
using System.Diagnostics;
using GlitchLog;
using GlitchyEngine.ImGui;
namespace Sandbox
{
class ExampleLayer : Layer
{
[AllowAppend]
public this() : base("Example") { }
public override void Update(GameTime gameTime)
{
if(Input.IsKeyPressed(.Tab))
Log.ClientLogger.Info("Tab key is pressed!");
}
public override void OnEvent(Event event)
{
Log.ClientLogger.Trace("{}", event);
}
}
class SandboxApp : Application
{
public this()
{
PushLayer(new ExampleLayer());
PushOverlay(new ImGuiLayer());
}
[Export, LinkName("CreateApplication")]
public static Application CreateApplication()
{
return new SandboxApp();
}
}
}