TechbloxModdingAPI/GamecraftModdingAPI/Events/SimpleEventEmitterEngine.cs

44 lines
1.1 KiB
C#
Raw Normal View History

2019-12-14 04:42:55 +00:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Svelto.ECS;
using GamecraftModdingAPI.Utility;
namespace GamecraftModdingAPI.Events
{
class SimpleEventEmitterEngine : IEventEmitterEngine
{
public string Name { get; set; }
public object type { get; set; }
public IEntityFactory Factory { private get; set; }
public IEntitiesDB entitiesDB { set; private get; }
public void Ready() { }
public void Emit()
{
Factory.BuildEntity<ModEventEntityDescriptor>(ApiExclusiveGroups.eventID++, ApiExclusiveGroups.eventsExclusiveGroup)
.Init(new ModEventEntityStruct
{
type = type
});
}
public SimpleEventEmitterEngine(EventType type, string name)
{
this.type = type;
this.Name = name;
}
public SimpleEventEmitterEngine(object type, string name)
{
this.type = type;
this.Name = name;
}
}
}