Implemented Layers and LayerStack

This commit is contained in:
Simon Lübeß
2020-11-09 00:10:02 +01:00
parent aa2165ef77
commit efb46ff25c
6 changed files with 148 additions and 15 deletions
+25
View File
@@ -0,0 +1,25 @@
using System;
using GlitchyEngine.Events;
namespace GlitchyEngine
{
public abstract class Layer
{
protected String _debugName;
[Inline]
public StringView Name => _debugName;
[AllowAppend]
public this(StringView name = "Layer")
{
String debugName = append String(name);
_debugName = debugName;
}
public virtual void OnAttach() { }
public virtual void OnDetach() { }
public virtual void Update() { }
public virtual void OnEvent(Event event) { }
}
}