Added ModulLoader

This commit is contained in:
Mueller Wayan
2025-04-22 20:19:35 +02:00
parent 766b2e414b
commit 47ddfed9bc
43 changed files with 471 additions and 372 deletions
@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Firebird2D.Datatypes;
using Firebird2D.Interfaces;
namespace Firebird2D.Interfaces
{
public interface IEventBus
{
public void OnPipelineIsBuild(Action<IPipeline> callback, FirebirdEvent firebirdEvent);
public IPipeline GetOrBuildPipeline(FirebirdEvent type, Type argsType, object master);
public IPipeline? GetPipeline(FirebirdEvent type, Type argsType);
public void DestroyPipeline(FirebirdEvent type, object master);
}
}
+14
View File
@@ -0,0 +1,14 @@
using Firebird2D.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Firebird2D.Interfaces
{
public interface IGame
{
public IEventBus EventBus { get; set; }
}
}
@@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Firebird2D.Interfaces
{
/// <summary>
/// Interface for the Firebird event Pipeline
/// </summary>
public interface IPipeline
{
/// <summary>
/// Class witch owns the Pipeline and has the right to send events or delete the pipeline
/// </summary>
object PipelineMaster { get; }
/// <summary>
/// Check if no one subscribed to the event
/// </summary>
bool IsEventEmpty { get; }
/// <summary>
/// Subscribe to this event Pipeline
/// </summary>
/// <param name="handler">Handler witch should be Invoked when the event is send</param>
void Subscribe(Delegate handler);
/// <summary>
/// Unsubscribe from this event Pipeline
/// </summary>
/// <param name="handler">Handler witch should be removed from the Pipeline</param>
void Unsubscribe(Delegate handler);
}
}