Fixed checkstyle errors causing build failures.

This commit is contained in:
Toxic Dreamz
2020-08-19 13:27:08 +04:00
parent 57e45a329f
commit 6921b0dce0
10 changed files with 151 additions and 108 deletions

View File

@ -40,7 +40,7 @@ public class AiComponentManager {
private final int numEntities;
private final Component[] AI_COMPONENTS = new AiComponent[MAX_ENTITIES];
private final Component[] aiComponents = new AiComponent[MAX_ENTITIES];
public AiComponentManager(int numEntities) {
this.numEntities = numEntities;
@ -51,7 +51,7 @@ public class AiComponentManager {
*/
public void start() {
LOGGER.info("Start AI Game Component");
IntStream.range(0, numEntities).forEach(i -> AI_COMPONENTS[i] = new AiComponent());
IntStream.range(0, numEntities).forEach(i -> aiComponents[i] = new AiComponent());
}
/**
@ -60,7 +60,7 @@ public class AiComponentManager {
public void update() {
LOGGER.info("Update AI Game Component");
IntStream.range(0, numEntities)
.filter(i -> AI_COMPONENTS.length > i && AI_COMPONENTS[i] != null)
.forEach(i -> AI_COMPONENTS[i].update());
.filter(i -> aiComponents.length > i && aiComponents[i] != null)
.forEach(i -> aiComponents[i].update());
}
}

View File

@ -40,7 +40,7 @@ public class PhysicsComponentManager {
private final int numEntities;
private final Component[] PHYSICS_COMPONENTS = new PhysicsComponent[MAX_ENTITIES];
private final Component[] physicsComponents = new PhysicsComponent[MAX_ENTITIES];
public PhysicsComponentManager(int numEntities) {
this.numEntities = numEntities;
@ -51,7 +51,7 @@ public class PhysicsComponentManager {
*/
public void start() {
LOGGER.info("Start Physics Game Component ");
IntStream.range(0, numEntities).forEach(i -> PHYSICS_COMPONENTS[i] = new PhysicsComponent());
IntStream.range(0, numEntities).forEach(i -> physicsComponents[i] = new PhysicsComponent());
}
@ -62,7 +62,7 @@ public class PhysicsComponentManager {
LOGGER.info("Update Physics Game Component ");
// Process physics.
IntStream.range(0, numEntities)
.filter(i -> PHYSICS_COMPONENTS.length > i && PHYSICS_COMPONENTS[i] != null)
.forEach(i -> PHYSICS_COMPONENTS[i].update());
.filter(i -> physicsComponents.length > i && physicsComponents[i] != null)
.forEach(i -> physicsComponents[i].update());
}
}

View File

@ -40,7 +40,7 @@ public class RenderComponentManager {
private final int numEntities;
private final Component[] RENDER_COMPONENTS = new RenderComponent[MAX_ENTITIES];
private final Component[] renderComponents = new RenderComponent[MAX_ENTITIES];
public RenderComponentManager(int numEntities) {
this.numEntities = numEntities;
@ -51,7 +51,7 @@ public class RenderComponentManager {
*/
public void start() {
LOGGER.info("Start Render Game Component ");
IntStream.range(0, numEntities).forEach(i -> RENDER_COMPONENTS[i] = new RenderComponent());
IntStream.range(0, numEntities).forEach(i -> renderComponents[i] = new RenderComponent());
}
@ -62,7 +62,7 @@ public class RenderComponentManager {
LOGGER.info("Update Render Game Component ");
// Process Render.
IntStream.range(0, numEntities)
.filter(i -> RENDER_COMPONENTS.length > i && RENDER_COMPONENTS[i] != null)
.forEach(i -> RENDER_COMPONENTS[i].render());
.filter(i -> renderComponents.length > i && renderComponents[i] != null)
.forEach(i -> renderComponents[i].render());
}
}