Import from internal git
This commit is contained in:
17
Core/Events/DisplayEmitter.cs
Normal file
17
Core/Events/DisplayEmitter.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
namespace Core.Events;
|
||||
|
||||
public class DisplayEmitter
|
||||
{
|
||||
public event EventHandler<DisplayEventArgs>? OnSay;
|
||||
public event EventHandler<DisplayEventArgs>? OnWarn;
|
||||
|
||||
public void Say(object? sender, string message)
|
||||
{
|
||||
OnSay?.Invoke(this, new DisplayEventArgs(message));
|
||||
}
|
||||
|
||||
public void Warn(object? sender, string message)
|
||||
{
|
||||
OnWarn?.Invoke(this, new DisplayEventArgs(message));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user