It makes more sense for Component to be an interface
This commit is contained in:
parent
f44f34b3de
commit
5eed818cc3
@ -3,7 +3,7 @@ package com.me.asteroids.components;
|
|||||||
import com.badlogic.gdx.math.Vector2;
|
import com.badlogic.gdx.math.Vector2;
|
||||||
import com.me.common.ecs.Component;
|
import com.me.common.ecs.Component;
|
||||||
|
|
||||||
public class AccelerationComponent extends Component {
|
public class AccelerationComponent implements Component {
|
||||||
|
|
||||||
public Vector2 acceleration;
|
public Vector2 acceleration;
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ import com.badlogic.gdx.math.Polygon;
|
|||||||
import com.badlogic.gdx.math.Rectangle;
|
import com.badlogic.gdx.math.Rectangle;
|
||||||
import com.me.common.ecs.Component;
|
import com.me.common.ecs.Component;
|
||||||
|
|
||||||
public class ModelComponent extends Component {
|
public class ModelComponent implements Component {
|
||||||
|
|
||||||
public Polygon model;
|
public Polygon model;
|
||||||
public Rectangle aabb;
|
public Rectangle aabb;
|
||||||
|
@ -2,6 +2,6 @@ package com.me.asteroids.components;
|
|||||||
|
|
||||||
import com.me.common.ecs.Component;
|
import com.me.common.ecs.Component;
|
||||||
|
|
||||||
public class PlayerComponent extends Component {
|
public class PlayerComponent implements Component {
|
||||||
// TODO: implement engine feature for tagging entities (as player, for e.g.)
|
// TODO: implement engine feature for tagging entities (as player, for e.g.)
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ package com.me.asteroids.components;
|
|||||||
import com.badlogic.gdx.math.Vector2;
|
import com.badlogic.gdx.math.Vector2;
|
||||||
import com.me.common.ecs.Component;
|
import com.me.common.ecs.Component;
|
||||||
|
|
||||||
public class PositionComponent extends Component {
|
public class PositionComponent implements Component {
|
||||||
|
|
||||||
public Vector2 position;
|
public Vector2 position;
|
||||||
public float rotation;
|
public float rotation;
|
||||||
|
@ -3,7 +3,7 @@ package com.me.asteroids.components;
|
|||||||
import com.badlogic.gdx.math.Vector2;
|
import com.badlogic.gdx.math.Vector2;
|
||||||
import com.me.common.ecs.Component;
|
import com.me.common.ecs.Component;
|
||||||
|
|
||||||
public class VelocityComponent extends Component {
|
public class VelocityComponent implements Component {
|
||||||
|
|
||||||
public Vector2 velocity;
|
public Vector2 velocity;
|
||||||
public float maxVelocity;
|
public float maxVelocity;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
package com.me.common.ecs;
|
package com.me.common.ecs;
|
||||||
|
|
||||||
public abstract class Component {
|
public interface Component {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user