Architecture question

This may be changed in a later video, if so please ignore…

From an architectural point of view, you now have the DiscoBallManager knowing about the light settings (global and spot) and, in the future, the music. Is it better to remove DimTheLights from DiscoBallManager so that the spotlights and global lights manage themselves? They subscribe to our OnDiscoBallHitEvent. I think you would need to make the Action so that you can OnDiscoBallHitEvent?.Invoke(_discoBallPartyTime), though.

Also, I made the DiscoBallManager an Instance (like in PlayerController) so I didn’t need to cache the reference in DiscoBall.

Apologies for getting to this so late.
I dont think we do change this later but it has been a while since i last did the course.

Its a very nice suggestion and probably something we can revise in the future.

Thanks for sharing Clive :slight_smile:

Privacy & Terms