My Understanding of the Observer Pattern

My understanding of the concept discussed in the lesson is that it is like the difference between a boss constantly checking in for updates (thus lowering their own efficiency as well as that of their employee) vs the employee coming to the boss when there is something to report.

By having the CameraRaycaster send data when there is a change in layer we are able to achieve the same goal much more efficiently. Additionally, as discussed in the lesson, this would allow us to have the CameraRaycaster perform other, similar functions when a change in input is detected without actively checking for a whole list of things every frame.

Privacy & Terms