mirror of
https://github.com/Keyslam-Group/Concord.git
synced 2025-09-04 13:23:54 -04:00
Update README.md to hint that components should be loaded for systems
This commit is contained in:
parent
7b8f7b2f0a
commit
1aaf501401
1 changed files with 5 additions and 5 deletions
10
README.md
10
README.md
|
@ -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.
|
Since you'll have lots of Components and Systems in your game Concord makes it a bit easier to load things in.
|
||||||
|
|
||||||
```lua
|
```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
|
-- 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 = {}
|
local Systems = {}
|
||||||
Concord.utils.loadNamespace("path/to/systems", Systems)
|
Concord.utils.loadNamespace("path/to/systems", Systems)
|
||||||
|
|
||||||
print(Systems.systemName)
|
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
|
#### Method chaining
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue