refactor: Renamed Cacher to Collector
This commit is contained in:
parent
775f24c560
commit
a35e25eb31
|
@ -22,8 +22,8 @@ public class GamePong : Game
|
||||||
private ShapeBatch shapeBatch = null!;
|
private ShapeBatch shapeBatch = null!;
|
||||||
|
|
||||||
private GameManager gameManager = null!;
|
private GameManager gameManager = null!;
|
||||||
private BehaviourCacher<IDisplayableSprite> displayableCacher = null!;
|
private BehaviourCollector<IDisplayableSprite> displayableCollector = null!;
|
||||||
private BehaviourCacher<IDisplayableShape> displayableShapeCacher = null!;
|
private BehaviourCollector<IDisplayableShape> displayableShapeCollector = null!;
|
||||||
private MonoGameCamera2DBehaviour cameraBehaviour = null!;
|
private MonoGameCamera2DBehaviour cameraBehaviour = null!;
|
||||||
|
|
||||||
private PongManagerBehaviour pongManager = null!;
|
private PongManagerBehaviour pongManager = null!;
|
||||||
|
@ -47,9 +47,9 @@ public class GamePong : Game
|
||||||
{
|
{
|
||||||
// TODO: Add your initialization logic here
|
// TODO: Add your initialization logic here
|
||||||
gameManager = new();
|
gameManager = new();
|
||||||
displayableCacher = new(gameManager);
|
displayableCollector = new(gameManager);
|
||||||
displayableShapeCacher = new(gameManager);
|
displayableShapeCollector = new(gameManager);
|
||||||
physicsEngine = new PhysicsEngine2DCacher(gameManager) { IterationPerStep = 3 };
|
physicsEngine = new PhysicsEngine2DCollector(gameManager) { IterationPerStep = 3 };
|
||||||
|
|
||||||
gameManager.Initialize();
|
gameManager.Initialize();
|
||||||
|
|
||||||
|
@ -154,12 +154,12 @@ public class GamePong : Game
|
||||||
gameManager.PreDraw();
|
gameManager.PreDraw();
|
||||||
|
|
||||||
spriteBatch.Begin(SpriteSortMode.Deferred, transformMatrix: cameraBehaviour.MatrixTransform);
|
spriteBatch.Begin(SpriteSortMode.Deferred, transformMatrix: cameraBehaviour.MatrixTransform);
|
||||||
foreach (var displayable in displayableCacher)
|
foreach (var displayable in displayableCollector)
|
||||||
displayable.Draw(spriteBatch);
|
displayable.Draw(spriteBatch);
|
||||||
spriteBatch.End();
|
spriteBatch.End();
|
||||||
|
|
||||||
shapeBatch.Begin(cameraBehaviour.MatrixTransform);
|
shapeBatch.Begin(cameraBehaviour.MatrixTransform);
|
||||||
foreach (var displayableShape in displayableShapeCacher)
|
foreach (var displayableShape in displayableShapeCollector)
|
||||||
displayableShape.Draw(shapeBatch);
|
displayableShape.Draw(shapeBatch);
|
||||||
shapeBatch.End();
|
shapeBatch.End();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue