Data and Event Handling - Breakdown
Magisteros » Devlog
Data and Event Handling
I tried a new approach to pass references of events and variables between many scripts to achieve as much cross-compatibility and decoupling as possible. I achieved this using an interface, generics, and the Observer Pattern.
A parent script will implement the IEventAndDataHandler interface to allow other scripts to interact with it. This parent script acts as the subject and all the scripts that reference the interface are the observers.
I designed this interface to be useful in many different use cases and perhaps I will use this in future projects to limit coupling and encourage scalability.
Get Magisteros
Magisteros
An Action RPG created during Mastered Bootcamp.
Status | Released |
Author | Brad Dallimer |
Genre | Action, Role Playing |
Tags | Action RPG, Fantasy, Prototype, Singleplayer, Third Person, Unity |
More posts
- Dynamic Scene Loading - BreakdownJun 20, 2023
- Melee Combat - BreakdownJun 20, 2023
- NPC AI - BreakdownJun 20, 2023
Leave a comment
Log in with itch.io to leave a comment.