Sleitnick / AeroGameFramework

AeroGameFramework is a Roblox game framework that makes development easy and fun. The framework is designed to simplify the communication between modules and seamlessly bridge the gap between the server and client.
https://sleitnick.github.io/AeroGameFramework/
MIT License
215 stars 57 forks source link

Module lifecycle #110

Closed Sleitnick closed 4 years ago

Sleitnick commented 4 years ago

This makes modules respect the Init/Start phases in the lifecycle of the framework. Before, a module required within the Init of a service or controller would make the Init and Start method of the module fire. This pull request will hold off on firing the Start method until the proper time within the lifecycle of the framework at startup.

The implementation is simple: If the framework wants to invoke a module's Start method, it first checks if the framework has reached that phase of the lifecycle. If not, it queues up the module to be started at a later time.