Skip to content

Commit 1ac1a57

Browse files
committed
Using entity.Destroy() and removed warnings
1 parent 90966d9 commit 1ac1a57

File tree

4 files changed

+4
-7
lines changed

4 files changed

+4
-7
lines changed

Tests/Unity/VisualDebugging/Assets/Examples/VisualDebugging/Systems/ProcessRandomValueSystem.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33

44
public class ProcessRandomValueSystem : ReactiveSystem<GameEntity> {
55

6-
readonly GameContext _context;
7-
86
public ProcessRandomValueSystem(Contexts contexts) : base(contexts.game) {
9-
_context = contexts.game;
107
}
118

129
protected override ICollector<GameEntity> GetTrigger(IContext<GameEntity> context) {
@@ -19,7 +16,7 @@ protected override bool Filter(GameEntity entity) {
1916

2017
protected override void Execute(List<GameEntity> entities) {
2118
foreach (var e in entities) {
22-
_context.DestroyEntity(e);
19+
e.Destroy();
2320
}
2421
}
2522
}

Tests/Unity/VisualDebugging/Assets/Examples/VisualDebugging/VisualDebuggingExampleController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,6 @@ void createTestEntityWithNullValues(GameContext context) {
169169
void createTestEntityError(GameContext context) {
170170
var entity = context.CreateEntity();
171171
entity.Retain(this);
172-
context.DestroyEntity(entity);
172+
entity.Destroy();
173173
}
174174
}

Tests/Unity/VisualDebugging/Assets/Tests/Manual Tests/Collector Destructor/CollectorDestructorController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ void Start() {
1111
context.GetGroup(GameMatcher.Test).CreateCollector();
1212
_initialEntity = context.CreateEntity();
1313
_initialEntity.isTest = true;
14-
context.DestroyEntity(_initialEntity);
14+
_initialEntity.Destroy();
1515
// TODO
1616
//context.ClearGroups();
1717
}

Tests/Unity/VisualDebugging/Assets/Tests/Manual Tests/ReactiveSystem Destructor/ReactiveSystemDestructorController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ void Start() {
1010
new TestReactiveSystem(Contexts.sharedInstance);
1111
_initialEntity = context.CreateEntity();
1212
_initialEntity.isTest = true;
13-
context.DestroyEntity(_initialEntity);
13+
_initialEntity.Destroy();
1414
}
1515

1616
void Update() {

0 commit comments

Comments
 (0)