2019-12-14 04:42:55 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
2019-12-16 00:35:59 +00:00
|
|
|
|
|
2019-12-14 04:42:55 +00:00
|
|
|
|
using Svelto.ECS;
|
|
|
|
|
|
2019-12-16 00:35:59 +00:00
|
|
|
|
using GamecraftModdingAPI.Utility;
|
|
|
|
|
|
2019-12-14 04:42:55 +00:00
|
|
|
|
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>
|
2019-12-16 00:35:59 +00:00
|
|
|
|
public interface IEventEmitterEngine : IApiEngine
|
2019-12-14 04:42:55 +00:00
|
|
|
|
{
|
2019-12-14 18:52:24 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The type of event emitted
|
|
|
|
|
/// </summary>
|
2020-04-02 17:08:05 +00:00
|
|
|
|
int type { get; }
|
2019-12-14 04:42:55 +00:00
|
|
|
|
|
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();
|
|
|
|
|
}
|
|
|
|
|
}
|