Update README.md to hint that components should be loaded for systems

This commit is contained in:
Justin van der Leij 2024-05-27 13:53:55 +02:00 committed by GitHub
parent 7b8f7b2f0a
commit 1aaf501401
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -133,16 +133,16 @@ Concord does a few things that might not be immediately clear. This segment shou
Since you'll have lots of Components and Systems in your game Concord makes it a bit easier to load things in.
```lua
-- Loads all files in the directory. Components automatically register into Concord.components, so loading them into a namespace isn't necessary.
Concord.utils.loadNamespace("path/to/components")
print(Concord.components.componentName)
-- Loads all files in the directory, and puts the return value in the table Systems. The key is their filename without any extension
local Systems = {}
Concord.utils.loadNamespace("path/to/systems", Systems)
print(Systems.systemName)
-- Loads all files in the directory. Components automatically register into Concord.components, so loading them into a namespace isn't necessary.
Concord.utils.loadNamespace("path/to/components")
print(Concord.components.componentName)
```
#### Method chaining