mirror of
https://github.com/MadeOfJelly/MushMachine.git
synced 2025-08-24 16:36:39 +02:00
initial import, >900commits predate this
This commit is contained in:
18
docs/framework/engine/services.md
Normal file
18
docs/framework/engine/services.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# Services
|
||||
|
||||
`MM::Service`s are the Components that get added to the `MM::Engine`.
|
||||
|
||||
They need to extend `MM::Service` (included in `<mm/engine.hpp>`) and implement the following Interface:
|
||||
|
||||
* Destructor (since it is virtual)
|
||||
* `bool enable(MM::Engine& engine)`
|
||||
* `void disable(MM::Engine& engine)`
|
||||
|
||||
and optionally
|
||||
|
||||
* `const char* name(void)`
|
||||
|
||||
Not implementing `name()` does not impact functionality, but it is not good practise.
|
||||
|
||||
Update and FixedUpdate callbacks should only be added in `enable()` and should be removed in `disable()`.
|
||||
|
Reference in New Issue
Block a user