Skip to content

Commit

Permalink
removed RenderData service inject from gameplay systems.
Browse files Browse the repository at this point in the history
  • Loading branch information
7Bpencil committed Jul 2, 2023
1 parent 2c72a7e commit d922873
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions code_src/PhysicsDemo/GameStartup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ protected override void OnLoad()

var objectsFactory = new PhysicsObjectsFactory(_world, _worldConstraints);
var gameplayData = new GameplayData(new Vector2(0, -9.80665f), 40f);
var renderData = new RenderData();
_physicsData = new PhysicsData(dt, 10, 4, 2);
_camera = new CameraOrthogonal(ClientSize, 12)
{
Expand All @@ -54,7 +53,7 @@ protected override void OnLoad()
.Add(new InitEnvironment())
// .Add(new ToolCreateSegments())
.Add(new ToolGrabber())
.Inject(objectsFactory, gameplayData, _physicsData, renderData, _camera, KeyboardState, MouseState)
.Inject(objectsFactory, gameplayData, _physicsData, _camera, KeyboardState, MouseState)
.Init();

_physicsSystems = new EcsSystems(_world);
Expand Down Expand Up @@ -97,7 +96,7 @@ protected override void OnLoad()
.Add(new DrawSprings())
.Add(new DrawBoundingBoxes())
.Add(new RenderMeshesMassCenter())
.Inject(renderData, _camera, new SimpleMeshRenderer2D(), new SimpleCircleRenderer2D(), new SimpleLineRenderer2D())
.Inject(_camera, new RenderData(), new SimpleMeshRenderer2D(), new SimpleCircleRenderer2D(), new SimpleLineRenderer2D())
.Init();
}

Expand Down

0 comments on commit d922873

Please sign in to comment.