Skip to content

Commit f06afae

Browse files
committed
fix MovingBlocks#617 (ii): Added Health component to the created rubble
1 parent 62b07db commit f06afae

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

engine/src/main/java/org/destinationsol/rubble/systems/RubbleCreationSystem.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import com.badlogic.gdx.graphics.Color;
1919
import com.badlogic.gdx.math.Vector2;
2020
import org.destinationsol.assets.Assets;
21+
import org.destinationsol.asteroids.components.AsteroidMesh;
2122
import org.destinationsol.body.components.BodyLinked;
2223
import org.destinationsol.common.In;
2324
import org.destinationsol.common.SolMath;
@@ -32,6 +33,7 @@
3233
import org.destinationsol.location.components.Angle;
3334
import org.destinationsol.location.components.Position;
3435
import org.destinationsol.location.components.Velocity;
36+
import org.destinationsol.moneyDropping.components.DropsMoneyOnDestruction;
3537
import org.destinationsol.removal.events.DeletionEvent;
3638
import org.destinationsol.removal.systems.DestructionSystem;
3739
import org.destinationsol.rendering.RenderableElement;
@@ -145,7 +147,8 @@ private void buildRubblePieces(Position pos, Velocity vel, Angle angle, Size siz
145147
velocityComponent.velocity = velocity;
146148

147149
EntityRef entityRef = entitySystemManager.getEntityManager().createEntity(graphicsComponent, positionComponent,
148-
velocityComponent, angle, sizeComponent, new RubbleMesh());
150+
sizeComponent, angle, velocityComponent, new RubbleMesh(), health);
151+
149152
SolMath.free(velocity);
150153
entityRef.setComponent(new BodyLinked());
151154
}

0 commit comments

Comments
 (0)