Skip to content

Commit 4524482

Browse files
Sync
1 parent 7b3ec0a commit 4524482

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ It's recommended to build your entire project around these life cycle methods.
5858

5959
### Controllers
6060

61-
**Introduction** | 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.
61+
**Introduction:** 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.
6262

6363
```csharp
6464
public class MainController : Controller {
@@ -71,17 +71,15 @@ public class MainController : Controller {
7171
}
7272
```
7373

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.
74+
**Virtual OnInitialized:** The controller consists of a OnInitialized virtual method. This method can be overwritten and will be invoked during the very first start of your application. It is important to invoke the Register method during this cycle since this is the only time in your application you can register [systems](#Systems) and [services](#Services).
7575

7676
```csharp
7777
public class MainController : Controller {
7878
public override void OnInitialize () { }
79-
public override void OnInitialized () { }
80-
public override void OnUpdate () { }
8179
}
8280
```
8381

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).
82+
**Notes:** 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).
8583

8684
### Systems
8785

0 commit comments

Comments
 (0)