From 1aaf50140135e5793b362a862cd15e8f0cfc52f0 Mon Sep 17 00:00:00 2001 From: Justin van der Leij Date: Mon, 27 May 2024 13:53:55 +0200 Subject: [PATCH] Update README.md to hint that components should be loaded for systems --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f7211e4..168db64 100644 --- a/README.md +++ b/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. ```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