Added better navigation, some information
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
*| [JavaECS](../README.md) | [docs](../overview.md) | system*
|
||||
# Overview
|
||||
### In this folder
|
||||
[system.md](./system.md)
|
||||
+17
-2
@@ -1,18 +1,28 @@
|
||||
*| [JavaECS](../../README.md) | [docs](../overview.md) | system*
|
||||
*| [JavaECS](../../README.md) | [docs](../overview.md) | [system](./dir.md) | system[]().md*
|
||||
# System
|
||||
|
||||
### Contents
|
||||
### In this section
|
||||
[About](#About)
|
||||
|
||||
[Implementation](#Implementation)
|
||||
|
||||
[Examples](#Examples)
|
||||
|
||||
[Notes](#Notes)
|
||||
|
||||
|
||||
## About
|
||||
The system runs operations that must be performed on its assoiciated components.
|
||||
|
||||
Typically, this is expected to be run every frame, though this is not a strict requirement.
|
||||
|
||||
A system must implement the Runnable interface (this is a limited case of inheritence in this library)
|
||||
|
||||
This allows a simpler implementation of any system, and also allows concurrency to be implemented with relative ease.
|
||||
|
||||
|
||||
|
||||
|
||||
Examples of the `system` include the `health_system`; which reads the value of the entitie's `health` component and ensures h > 0.
|
||||
``` java
|
||||
void health_system(){
|
||||
@@ -44,4 +54,9 @@ class SystemManager{
|
||||
|
||||
## Examples
|
||||
|
||||
## Notes
|
||||
* Each system is represented by a name-index pair, and the action that gets executed every time the system is performed.
|
||||
* This is implicitly sequential, but a custom system that performs concurrent actions can be implemented.
|
||||
* Care must be taken to ensure all threads are synchronised before the concurrent system finishes its execution
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user