aboutsummaryrefslogtreecommitdiff
path: root/source/resources/types/EntityType.cs
diff options
context:
space:
mode:
Diffstat (limited to 'source/resources/types/EntityType.cs')
-rw-r--r--source/resources/types/EntityType.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/source/resources/types/EntityType.cs b/source/resources/types/EntityType.cs
new file mode 100644
index 0000000..4ecc20f
--- /dev/null
+++ b/source/resources/types/EntityType.cs
@@ -0,0 +1,20 @@
+using System;
+using MonoGame.Extended.Entities;
+
+namespace Celesteia.Resources.Types {
+ public class EntityType : IResourceType {
+ private byte id;
+ public byte GetID() => id;
+ public void SetID(byte value) => id = value;
+
+ private Action<Entity> InstantiateAction;
+
+ public EntityType(Action<Entity> instantiate) {
+ InstantiateAction = instantiate;
+ }
+
+ public void Instantiate(Entity entity) {
+ InstantiateAction.Invoke(entity);
+ }
+ }
+} \ No newline at end of file