Events over public methods

Wouldn’t it be better to disable having to get a reference and actually creating an event that could disable these controls on the PlayerController, either from winning or crashing?

Found the following article: Research shows - SendMessage is not good. Consider events instead

I actually started using my own EventAggregator in a few of my titles (pub/sub pattern) - can just fire events off through the aggregator and not care who listens.

Then other modules can subscribe to the events they care about.

I agree with removing as many references as possible to reduce coupling.

Hi Dominick,

You are right. SendMessage is meant for prototyping only. However, since this course caters to beginners and since our projects are fairly small, Rick prefers to stick with simple solutions instead of introducing new concepts.

Please feel free to improve the solutions in your game project. :slight_smile:


See also:

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms