mirror of
https://onedev.site.tesses.net/tytd2025
synced 2026-02-08 17:45:45 +00:00
27 lines
304 B
Plaintext
27 lines
304 B
Plaintext
class TYTD.Event {
|
|
private _events = [];
|
|
|
|
public operator+(e)
|
|
{
|
|
if (!_events.Contains(e))
|
|
{
|
|
this._events.Add(e);
|
|
}
|
|
return this;
|
|
}
|
|
|
|
public operator-(e)
|
|
{
|
|
this._events.Remove(e);
|
|
return this;
|
|
}
|
|
|
|
|
|
public Invoke($$args)
|
|
{
|
|
each(var e : this._events)
|
|
{
|
|
e.Call(args);
|
|
}
|
|
}
|
|
} |