GOOC - Game Oriented Object C

GOOC - Game Oriented Object C

Next: Handling Events, Previous: Sending Events, Up: Event System
[Contents]

14.2. Multiple-Object Event Test

14.2. Multiple-Object Event Test

When using event broadcasting or cascading, it's likely that you can encounter a scenario where you want only a specific set of objects to receive the event. The parameter that is used to determine the target object for those two types of events is instead used as the type of test to be run during event cascading or broadcasting1.

The test routine keeps track of how many objects have passed the test. This does not necessarily relate to the amount of objects that have received the event.

There are six types of test.


1 Event cascading does use a target object, giving this field double duty in this scenario. Pay very close attention to how you use it!