Brychan Dempsey
b1efb9802d
Leaves only the framework in the compiled clause. Find the removed files in ../examples/misc/
24 lines
512 B
Java
24 lines
512 B
Java
package nz.ac.massey.javaecs;
|
|
|
|
public class LogVec2DSystem extends ECSSystem{
|
|
ECS gameEngine;
|
|
public LogVec2DSystem(ECS gameEngine){
|
|
this.gameEngine = gameEngine;
|
|
}
|
|
|
|
@Override
|
|
void init() {}
|
|
|
|
@Override
|
|
void update() {}
|
|
|
|
void update(double dt){
|
|
for (Integer entity : entities) {
|
|
Vec2D pos = (Vec2D)gameEngine.getComponentData(entity, Vec2D.class);
|
|
System.out.println(String.format("X: %.6g, Y: %.6g", pos.x, pos.y));
|
|
}
|
|
}
|
|
|
|
|
|
}
|