public void RecieveUnitEvent(MazeUnitEvent unitEvent) { if (MazeUnitEventOccured != null) { MazeUnitEventOccured(unitEvent); } }
void OnTriggerExit(Collider c) { var evt = new MazeUnitEvent(MazeUnitEventType.Exiting, c, this); SendMessageUpwards("RecieveUnitEvent", evt, SendMessageOptions.DontRequireReceiver); }