make Trigger and Queue methods generic to carry through full event type
Or at least, to carry it through without having to do a GetType() when needed when we are freeing the event in the object pool.
This commit is contained in:
parent
b5fd222063
commit
df2b49647c
|
@ -85,7 +85,7 @@ namespace Blarg.GameFramework.Events
|
|||
return false;
|
||||
}
|
||||
|
||||
public bool Trigger(Event e)
|
||||
public bool Trigger<T>(T e) where T : Event
|
||||
{
|
||||
if (e == null)
|
||||
throw new ArgumentNullException("e");
|
||||
|
@ -121,7 +121,7 @@ namespace Blarg.GameFramework.Events
|
|||
return result;
|
||||
}
|
||||
|
||||
public bool Queue(Event e)
|
||||
public bool Queue<T>(T e) where T : Event
|
||||
{
|
||||
if (e == null)
|
||||
throw new ArgumentNullException("e");
|
||||
|
|
Reference in a new issue