Skip to content

Commit 824b668

Browse files
Sync
1 parent e8e9001 commit 824b668

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

README.md

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ It's recommended to build your entire project around these life cycle methods.
6464
public class MainController : Controller { }
6565
```
6666

67-
**Virtual OnInitialize:** The controller consists of an OnInitialize virtual method. This method can be overwritten and will be invoked during the very start of your application. During this cycle none [injectables](#Injectables) or [assets](#Assets) are being assigned, 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).
67+
**Virtual On Initialize:** The controller consists of an OnInitialize virtual method. This method can be overwritten and will be invoked during the very start of your application. During this cycle none [injectables](#Injectables) or [assets](#Assets) are being assigned, 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).
6868

6969
```csharp
7070
public class MainController : Controller {
@@ -77,44 +77,44 @@ public class MainController : Controller {
7777
}
7878
```
7979

80-
**Virtual OnInitialized:** The controller consists of an OnInitialized virtual method. This method can be overwritten and will be invoked when all [systems](#Systems) and [services](#Services) did initialize and all [injectables](#Injectables) and [assets](#Assets) properties are assigned.
80+
**Virtual On Initialized:** The controller consists of an OnInitialized virtual method. This method can be overwritten and will be invoked when all [systems](#Systems) and [services](#Services) did initialize and all [injectables](#Injectables) and [assets](#Assets) properties are assigned.
8181

8282
```csharp
8383
public class MainController : Controller {
8484
public override void OnInitialized () { }
8585
}
8686
```
8787

88-
**Virtual OnUpdate:** The controller consists of an OnUpdate virtual method. This method can be overwritten and will be invoked during the update cycle. This cycle will run once every frame, the controller's Update is invoked before the [system's](#Systems) and [service's](#Services) update cycles.
88+
**Virtual On Update:** The controller consists of an OnUpdate virtual method. This method can be overwritten and will be invoked during the update cycle. This cycle will run once every frame, the controller's Update is invoked before the [system's](#Systems) and [service's](#Services) update cycles.
8989

9090
```csharp
9191
public class MainController : Controller {
9292
public override void OnUpdate () { }
9393
}
9494
```
9595

96-
**Enabling Systems:** To enable or disable [systems](#Systems), the controller contains of a method EnableSystem which allows [systems](#Systems) to stop their life cycle methods such as OnUpdate, OnPhysics, OnDrawGui and others.
96+
**Enabling Systems:** To enable or disable [systems](#Systems), the controller contains of a method EnableSystem which allows [systems](#Systems) to stop their life cycle methods such as OnUpdate, OnPhysics, OnDrawGui and others. You can provide the [system's](#System) type using a generic.
9797

9898
```csharp
9999
public class MainController : Controller {
100-
public void DoSomething () {
101-
this.SetSystemEnabled<MovementSystem>(true);
102-
this.SetSystemEnabled<InteractableSystem>(false);
100+
public void SomeMethod () {
101+
this.SetSystemEnabled<MovementSystem> (true);
102+
this.SetSystemEnabled<InteractableSystem> (false);
103103
}
104104
}
105105
```
106106

107-
**Is System Enabled:** To check wether [systems](#Systems) are enable or disabled, the controller contains of a method IsSystemEnabled. Invoking the method will return a booling informing if the [systems](#Systems) is enabled or not.
107+
**Checking Wether Systems Are Enabled:** To check wether [systems](#Systems) are enable or disabled, the controller contains of a method IsSystemEnabled. Invoking the method will return a booling informing if the [system](#Systems) is enabled or not. You can provide the [system's](#System) type using a generic.
108108

109109
```csharp
110110
public class MainController : Controller {
111-
public void DoSomething () {
112-
if (this.IsSystemEnabled<MovementSystem>()) { }
111+
public void SomeMethod () {
112+
if (this.IsSystemEnabled<MovementSystem> ()) { }
113113
}
114114
}
115115
```
116116

117-
**Injection:** The controller can be be used as an [injected](#Injectables) property and allows insertion of other [injected](#Injectables) [systems](#Systems) and [services](#Services) properties. When being injected, all public methods and properties are accessibly.
117+
**Injection:** The controller allows insertion of [injected](#Injectables) [systems](#Systems) and [services](#Services) properties. When being injected, all public methods and properties are accessibly. When adding the attribute to any of these type of fields, they will be assigned during the OnInitialze cycle. All public methods and properties within these properties are accessibly like normal.
118118

119119
```csharp
120120
public class MainController : Controller {
@@ -129,8 +129,4 @@ public class MainController : Controller {
129129

130130
### Components
131131

132-
### Services
133-
134-
### Injectables
135-
136-
### Assets
132+
### Services

0 commit comments

Comments
 (0)