Skip to content

Commit a12b563

Browse files
Improved internal attribute implementation
1 parent c05690f commit a12b563

File tree

5 files changed

+7
-32
lines changed

5 files changed

+7
-32
lines changed

Runtime/Attributes/Internal.cs

Lines changed: 0 additions & 7 deletions
This file was deleted.

Runtime/Attributes/Internal.cs.meta

Lines changed: 0 additions & 11 deletions
This file was deleted.

Runtime/EntityComponent.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,7 @@ public void AddLocalScale (float x, float y, float z) =>
119119

120120
/// During the 'InteralOnUpdate' the entity component will invoke its
121121
/// 'OnEntityEnabled' and 'OnEntityInitialized' if needed.
122-
[Internal]
123-
public void Internal_OnUpdate () {
122+
internal void Internal_OnUpdate () {
124123
if (this.isInitialized == false) {
125124
this.isInitialized = true;
126125
this.GetSystem ().OnEntityInitialized ((EntityComponentType)this);

Runtime/EntitySystem.cs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,11 @@ public void SetEnabled (bool value) =>
134134

135135
/// Internal method to set the instance reference. This method will
136136
/// be called after the controller and system initialization.
137-
[Internal]
138-
public void Internal_OnInitialize () =>
137+
internal void Internal_OnInitialize () =>
139138
Instance = Controller.Instance.GetSystem<EntitySystemType> ();
140139

141140
/// Internal method to update the children of the system.
142-
[Internal]
143-
public void Internal_OnUpdate () {
141+
internal void Internal_OnUpdate () {
144142
if (this.isInitialized == false) {
145143
this.OnInitialized ();
146144
if (Controller.Instance.IsSystemEnabled<EntitySystemType> () == true)
@@ -152,8 +150,7 @@ public void Internal_OnUpdate () {
152150
}
153151

154152
/// Internal method to add an entity's component to this system.
155-
[Internal]
156-
public void Internal_AddEntity (EntityComponentType component) {
153+
internal void Internal_AddEntity (EntityComponentType component) {
157154
if (this.hasEntities == false)
158155
this.entity = component;
159156
this.entityCount++;
@@ -163,8 +160,7 @@ public void Internal_AddEntity (EntityComponentType component) {
163160
}
164161

165162
/// Internal method to remove an entity's component from this system.
166-
[Internal]
167-
public void Internal_RemoveEntry (EntityComponentType component) {
163+
internal void Internal_RemoveEntry (EntityComponentType component) {
168164
this.entityCount--;
169165
this.hasEntities = this.entityCount > 0;
170166
this.OnEntityWillDestroy (component);

Runtime/Service.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,11 @@ public void StopCoroutine (System.Collections.IEnumerator routine) =>
3838

3939
/// Internal method to set the instance reference. This method will
4040
/// be called after the controller and system initialization.
41-
[Internal]
42-
public void Internal_OnInitialize () =>
41+
internal void Internal_OnInitialize () =>
4342
Instance = Controller.Instance.GetService<ServiceType> ();
4443

4544
/// Internal method to update the service.
46-
[Internal]
47-
public void Internal_OnUpdate () {
45+
internal void Internal_OnUpdate () {
4846
if (this.isInitialized == false) {
4947
this.OnInitialized ();
5048
this.isInitialized = true;

0 commit comments

Comments
 (0)