Skip to content

Commit df811df

Browse files
Update README.md
1 parent 541e7a7 commit df811df

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

README.md

+9-8
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,21 @@ Task3 : Wait for 10 seconds
99
Task4 : Log "I waited for 10 seconds"
1010
Task5 : Disable the gameobject
1111

12-
You can create difference types of these tasks and execute them when you want through code.
12+
You can create different types of these tasks and execute them when you want through code.
1313
You can create as many task lists as you need and set the task list you want to use at that time as the 'current task list'.
1414
Start, stop and manage your system. I have used this system in a previously published game and created multiple of these task types as needed by game designers.
1515
These work similar to story graphs and can be used by non-technical staff.
16+
The system is built upon reusing of objects (tasks and sequence) by pooling them, so that at any instance there aren't many unused objects.
1617

1718
## Tutorial
1819
1. Open the 'Example' scene
1920
2. In the toolbar there exists an option 'Task System'->'Manager'. This opens the 'Manager' window to create tasklists or run sequences at runtime for debugging.
2021
3. 'Task List XML Source Path' is the directory of the folder that includes all the task lists. A Task List is an XML list that includes your sequences and tasks. You can have as many of these task lists as you desire.
21-
4. When you edit a task list, it needs to be turned into a Unity Asset. You can do this by clicking 'Create All Scriptable Objects'. These newly created Unity Assets are then placed into the folder in the directory 'Task List Asset Destination Path'
22-
5. Once the game begins, add the task lists you need at that moment and you can select a single task list to be used as the current to refer to. This task list is the one you refer to when whish to execute a sequence i.e. the sequence you run should be found in this task list.
23-
6. Currently there exists 2 example tasks: TaskWait and TaskLog. To create more types of tasks, replicate the .cs code and add your relevant addition in place of the inherited code.
22+
4. When you edit a task list it needs to be turned into a Unity Asset. You can do this by clicking 'Create All Scriptable Objects'. These newly created Unity Assets are then placed into the folder in the directory 'Task List Asset Destination Path'
23+
5. Once the game begins, add/remove the task lists you need at that moment AddTaskList(a_strAssetPath), RemoveTaskList(a_strTaskListName) and you can select a single task list to be used as the current to refer to by executing 'SetCurrentTaskList(TaskListName)'. This task list is the one you refer to when wish to execute a sequence i.e. the sequence you run should be found in this task list.
24+
6. Currently there exist 2 example tasks: TaskWait and TaskLog. To create more types of tasks, replicate the TaskWait.cs code and add your new task relevant code in place of the inherited code.
2425
1. onInitialize() is called when the sequence begins executing.
25-
2. onExecute() Called when that task is executed
26-
3. onUpdate() Called while the task is ongoing similar to the update function but for that task specifically
27-
4. onComplete() Called when the task is completed. This needs to be called by you specifying that this task is completed. For example: TaskWait waits for some time and after that specified time calls onComplete()
28-
7. The TaskManager manager all execution and management of tasks, call TaskManagerExecuteSequence(SequenceName) to start a sequence. The sequence can also be stopped etc.
26+
2. onExecute() Called when that task is executed.
27+
3. onUpdate() Called while the task is ongoing similar to the update function but for that task specifically.
28+
4. onComplete() Called when the task is completed. This needs to be called by you specifying that this task is completed. For example: TaskWait waits for some time and after that specified time calls onComplete().
29+
7. The TaskManager manages all execution and management of tasks, call TaskManagerExecuteSequence(SequenceName) to start a sequence and a sequence can also be stopped etc.

0 commit comments

Comments
 (0)