Skip to content

Commit

Permalink
Add documentation in different folders (#146)
Browse files Browse the repository at this point in the history
* Fix typo

* Add more documentation in different folders.

Add documentation files in different parts of the plugin to explain what's the purpose of the contained files.
  • Loading branch information
AnidemDex authored May 6, 2024
1 parent 7cec64f commit 3ad3a19
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
> _First off, many, many, many thanks for consider contributing to this plugin! I like to make things, but getting a hand on it is much better.
> I really appreciate that you are reading this file_
**Abstract:** _Report issues if no one have faced that issue before, else comment the opened issue; request stuff if you find it situable and goes in the same way as this project goal; open pull request for opened issues of to improve/fix stuff that follows the same goal as this project and, please, document what you do, in the code or in the commit._
**Abstract:** _Report issues if no one have faced that issue before, else comment the opened issue; request stuff if you find it suitable and goes in the same way as this project goal; open pull request for opened issues of to improve/fix stuff that follows the same goal as this project and, please, document what you do, in the code or in the commit._

---

Expand Down
33 changes: 33 additions & 0 deletions commands/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Command
Command is a Collection derivation, containing information about what the processor should do when it reach that command.

Each command defines its own behavior and should notify the processor when it ends or what should be the next step that it should take.

To create a custom command, just extend from `Command`, define a name, its behavior and finally register it to `CommandRecord`.

```gdscript
@tool # <- It MUST be tool or editor will not be able to use it.
extends Command
func _execution_steps() -> void:
## Always notify that your command started. You have total control on
## where to emit this signal, but be sure to emit it once.
command_started.emit() # Notify that your command started
## Implement your command behavior
print("Hello")
## Never forget to notify that you command have finished in order
## to let the command manager know that is safe to continue to
## the next event.
go_to_next_command()
## Here you define your command name
func _get_name() -> StringName:
return "CUSTOM_COMMAND"
## You can define other properties of the command,
## Editor will use those to change the command block appeareance.
func _get_icon() -> Texture:
return load("res://icon.svg")
```
4 changes: 4 additions & 0 deletions core/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Core
Very important files that didn't fit in any other folder.

These files are usually tied to the plugin than the editor itself, like the main plugin script or util functions used in many editor places.
4 changes: 4 additions & 0 deletions debugger/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Debugger
Debugger is the bridge between running game and editor.

Its goal is to provide a visual feedback about the flow of the current processors that are in the current scene of the game.
4 changes: 4 additions & 0 deletions editor/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Editor
Blockflow editor.

The editor main purpose is to provide a tool to create and modify collections and commands to be used later in game through processors.

0 comments on commit 3ad3a19

Please sign in to comment.