Madboy James
Member
Hi,
I looked through the documentation and forums, but I am finding it challenging to figure out how to create a custom event using Opsive EventHandler.
I have an EnemyWaveManager, and I would like to create an event OnWaveStart and OnWaveEnd.
When I call this on start, after registering onEnable, my method doesn't trigger.
I am registering by
and the method is just
How would I create a custom event or what am I missing?
I looked through the documentation and forums, but I am finding it challenging to figure out how to create a custom event using Opsive EventHandler.
I have an EnemyWaveManager, and I would like to create an event OnWaveStart and OnWaveEnd.
When I call this on start, after registering onEnable, my method doesn't trigger.
C#:
EventHandler.ExecuteEvent("OnWaveStart");
I am registering by
C#:
EventHandler.RegisterEvent(gameObject, "OnWaveStart", OnWaveStart);
C#:
private void OnWaveStart()
{
//spawn enemy
SpawnEnemy();
}
How would I create a custom event or what am I missing?