TechbloxModdingAPI/GamecraftModdingAPI/Events/IEventEmitterEngine.cs
2019-12-15 16:35:59 -08:00

40 lines
1.1 KiB
C#

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
{
/// <summary>
/// Engine interface to create a ModEventEntityStruct in entitiesDB when Emit() is called.
/// </summary>
public interface IEventEmitterEngine : IApiEngine
{
/// <summary>
/// The type of event emitted
/// </summary>
object type { get; }
/// <summary>
/// Whether the emitter can be removed with Manager.RemoveEventEmitter(name)
/// </summary>
bool isRemovable { get; }
/// <summary>
/// The EntityFactory for the entitiesDB.
/// Use this to create a ModEventEntityStruct when Emit() is called.
/// </summary>
IEntityFactory Factory { set; }
/// <summary>
/// Emit the event so IEventHandlerEngines can handle it.
/// Call Emit() to trigger the IEventEmitterEngine's event.
/// </summary>
void Emit();
}
}