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;
|
|
|
|
|
|
|
|
|
|
namespace GamecraftModdingAPI.Events
|
|
|
|
|
{
|
2019-12-14 18:52:24 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Engine interface to create a ModEventEntityStruct in entitiesDB when Emit() is called.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public interface IEventEmitterEngine : IEngine, IQueryingEntitiesEngine, IDisposable
|
2019-12-14 04:42:55 +00:00
|
|
|
|
{
|
2019-12-14 18:52:24 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The name of the IEventEmitterEngine
|
|
|
|
|
/// </summary>
|
2019-12-14 04:42:55 +00:00
|
|
|
|
string Name { get; }
|
2019-12-14 18:52:24 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The type of event emitted
|
|
|
|
|
/// </summary>
|
2019-12-14 04:42:55 +00:00
|
|
|
|
object type { get; }
|
|
|
|
|
|
2019-12-14 18:52:24 +00:00
|
|
|
|
/// <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>
|
2019-12-14 04:42:55 +00:00
|
|
|
|
IEntityFactory Factory { set; }
|
|
|
|
|
|
2019-12-14 18:52:24 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Emit the event so IEventHandlerEngines can handle it.
|
|
|
|
|
/// Call Emit() to trigger the IEventEmitterEngine's event.
|
|
|
|
|
/// </summary>
|
2019-12-14 04:42:55 +00:00
|
|
|
|
void Emit();
|
|
|
|
|
}
|
|
|
|
|
}
|