Skip to content

Commit 3ad3a19

Browse files
authored
Add documentation in different folders (#146)
* 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.
1 parent 7cec64f commit 3ad3a19

File tree

5 files changed

+46
-1
lines changed

5 files changed

+46
-1
lines changed

‎CONTRIBUTING.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
> _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.
44
> I really appreciate that you are reading this file_
55
6-
**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._
6+
**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._
77

88
---
99

‎commands/README.md‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Command
2+
Command is a Collection derivation, containing information about what the processor should do when it reach that command.
3+
4+
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.
5+
6+
To create a custom command, just extend from `Command`, define a name, its behavior and finally register it to `CommandRecord`.
7+
8+
```gdscript
9+
@tool # <- It MUST be tool or editor will not be able to use it.
10+
extends Command
11+
12+
func _execution_steps() -> void:
13+
## Always notify that your command started. You have total control on
14+
## where to emit this signal, but be sure to emit it once.
15+
command_started.emit() # Notify that your command started
16+
17+
## Implement your command behavior
18+
print("Hello")
19+
20+
## Never forget to notify that you command have finished in order
21+
## to let the command manager know that is safe to continue to
22+
## the next event.
23+
go_to_next_command()
24+
25+
## Here you define your command name
26+
func _get_name() -> StringName:
27+
return "CUSTOM_COMMAND"
28+
29+
## You can define other properties of the command,
30+
## Editor will use those to change the command block appeareance.
31+
func _get_icon() -> Texture:
32+
return load("res://icon.svg")
33+
```

‎core/README.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Core
2+
Very important files that didn't fit in any other folder.
3+
4+
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.

‎debugger/README.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Debugger
2+
Debugger is the bridge between running game and editor.
3+
4+
Its goal is to provide a visual feedback about the flow of the current processors that are in the current scene of the game.

‎editor/README.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Editor
2+
Blockflow editor.
3+
4+
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 commit comments

Comments
 (0)