mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
42 lines
736 B
Beef
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();
|
|
}
|
|
}
|
|
}
|