From dd24f3fd45caac7677f3b533d15463054a874974 Mon Sep 17 00:00:00 2001 From: Mestima Date: Tue, 10 Oct 2023 13:07:06 +0300 Subject: [PATCH] README updated according lowercase naming convention --- README.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 888f18b..311e97d 100644 --- a/README.md +++ b/README.md @@ -16,14 +16,14 @@ Example compilation `Windows` command: `scons p=windows tools=yes -j4` ## Methods ```gdscript -hook.GetTable() -hook.Add(event: String, uid: String, function: Callable) -hook.Call(event: String, args: Array = [], defer: bool = false) -hook.Remove(event: String, uid: String) +hook.getTable() +hook.add(event: String, uid: String, function: Callable) +hook.call(event: String, args: Array = [], defer: bool = false) +hook.remove(event: String, uid: String) ``` ## Usage -`hook.Add` creates a new listening event and `hook.Call` executes all listening events of the same type, for example: +`hook.add` creates a new listening event and `hook.call` executes all listening events of the same type, for example: ```gdscript # autorun.gd @@ -36,31 +36,31 @@ func printHookOutput1(a: String, b: String): func printHookOutput2(a: String, b: String): print(a, " ", b) -hook.Add("OnReady", "UniqueName1", Callable(self, "printHookOutput1")) -hook.Add("OnReady", "UniqueName2", Callable(self, "printHookOutput2")) +hook.add("OnReady", "UniqueName1", Callable(self, "printHookOutput1")) +hook.add("OnReady", "UniqueName2", Callable(self, "printHookOutput2")) ``` ```gdscript # any node script func _ready(): - hook.Call("OnReady", ["Hey!", "It's OnReady hook!"]) - hook.Call("OnReady", ["Hey!", "It's OnReady hook, but deferred!"], true) + hook.call("OnReady", ["Hey!", "It's OnReady hook!"]) + hook.call("OnReady", ["Hey!", "It's OnReady hook, but deferred!"], true) ``` -`hook.Remove` removes any listening event by its name and type: +`hook.remove` removes any listening event by its name and type: ```gdscript # can be executed at any place -hook.Remove("OnReady", "UniqueName") +hook.remove("OnReady", "UniqueName") ``` -`hook.GetTable` returns a `Dictionary` with all added listening events +`hook.getTable` returns a `Dictionary` with all added listening events ```gdscript # can be executed at any place -var hookTable: Dictionary = hook.GetTable() +var hookTable: Dictionary = hook.getTable() ``` ## Star History