Skip to content

Commit b9cba08

Browse files
Sync
1 parent 0366c3e commit b9cba08

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

README.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,11 @@ It's recommended to build your entire project around these life cycle methods.
5454

5555
<img src="https://raw.githubusercontent.com/elraccoone/unity-entity-component-system/master/.github/WIKI/lifecycle.png" width="100%"></br>
5656

57-
## Definitions
57+
## The basics
5858

5959
### Controllers
6060

61-
The controller is the core of your application, it is of such importance that each application should only contain one of it. The controller is where your application will start from and all systems and services are registered. This can only be done during the OnInitialize method using the controller's Register method.
62-
63-
To get started with your first controller you can generate one using the generator, for the controller to work it should be assined to one game object in your scene. Your first controller should at least consist of invoking the register method.
61+
The controller is the core of your application, it is of such importance that each application should only contain one of it. The controller is where your application will start from and all systems and services are registered. This can only be done during the OnInitialize method using the controller's Register method. To get started with your first controller you can use the generator, for the controller to work it should be assined to a game object in your scene.
6462

6563
```csharp
6664
public class MainController : Controller {
@@ -70,4 +68,27 @@ public class MainController : Controller {
7068
typeof (AudioService)
7169
);
7270
}
71+
}
72+
```
73+
74+
The controller contains a series of overwriteable lifecyle methods. Consult the life cycles sheet for more information about when and in which order these methods will be invoked. All life cycle methods are optional and can be implemented all at once.
75+
76+
```csharp
77+
public class MainController : Controller {
78+
public override void OnInitialize () { }
79+
public override void OnInitialized () { }
80+
public override void OnUpdate () { }
81+
}
7382
```
83+
84+
While it is recommended to move as much logic into [services](#Services) and [systems](#Systems), it is possible to let your controller house any functionality. If you use the controller for this purpose, try to keep it down to only application wide and core functionality. All public methods and properties are accessibly when having the controller [injected](#Injectables).
85+
86+
### Systems
87+
88+
### Components
89+
90+
### Services
91+
92+
### Injectables
93+
94+
### Assets

0 commit comments

Comments
 (0)