This is the documentation example that's not correct
//The signal typespublicstructSignalPlayerDamaged:ISignalPlayerHpChanged{
ISignalPlayerHpChanged.PlayerHp =>playerHp;publicfloatplayerHp;}publicstructSignalPlayerDamaged:ISignalPlayerHpChanged{
ISignalPlayerHpChanged.PlayerHp =>playerHp;publicfloatplayerHp;}//The interface for the signalspublicstructISignalPlayerHpChanged{floatPlayerHp{get;}}
This is the correct version that compiles
//The interface for the signalspublicinterfaceISignalPlayerHpChanged{publicfloatPlayerHp{get;}}//The signal typespublicstructSignalPlayerDamaged:ISignalPlayerHpChanged{publicfloatplayerHp;publicfloatPlayerHp=> playerHp;}publicstructSignalPlayerHealed:ISignalPlayerHpChanged{publicfloatplayerHp;publicfloatPlayerHp=> playerHp;}
You have to call abstract signals using SignalBus.AbstractFire<T>(T t)
Desired Behaviour
You should be able to call it SignalBus<T>.AbstractFire(T t)
Motivation:
SignalBus class is used for everything except for abstract Signals, which feels a little odd. I propose that InterfaceCompatibleSignal.cs classes are just helpers for LightWeightSignalBus.cs abstracted to the user.
Proposal:
Add AbstractFire method to SignalBus that internally calls Signal.AbstractFire(T t)
This repo contains two classes that are similar but not the same and can be confusing to have both. I would suggest splitting the repo into two and improving documentation, as the one we have now in the readme aren't good as it has errors and don't compile