refactor: implemented new IBehaviourCollector

This commit is contained in:
Syntriax 2025-05-29 23:17:44 +03:00
parent 3c38cb4159
commit 0acd119099
2 changed files with 5 additions and 5 deletions

2
Engine

@ -1 +1 @@
Subproject commit 67d7f401b832156e40e9bda11a4546cccd232707
Subproject commit b0f8b0dad6ec3b5c9b0ebff0bcf535ebf0901e30

View File

@ -179,13 +179,13 @@ public class GamePong : Game
universe.Draw();
spriteBatch.Begin(SpriteSortMode.Deferred, transformMatrix: cameraBehaviour.MatrixTransform);
for (int i = displayableCollector.Behaviours.Count - 1; i >= 0; i--)
displayableCollector.Behaviours[i].Draw(spriteBatch);
for (int i = displayableCollector.Count - 1; i >= 0; i--)
displayableCollector[i].Draw(spriteBatch);
spriteBatch.End();
shapeBatch.Begin(cameraBehaviour.MatrixTransform);
for (int i = displayableShapeCollector.Behaviours.Count - 1; i >= 0; i--)
displayableShapeCollector.Behaviours[i].Draw(shapeBatch);
for (int i = displayableShapeCollector.Count - 1; i >= 0; i--)
displayableShapeCollector[i].Draw(shapeBatch);
shapeBatch.End();
base.Draw(gameTime);