It makes more sense for Component to be an interface

This commit is contained in:
Matt Low 2020-01-25 15:51:06 +04:00
parent f44f34b3de
commit 5eed818cc3
6 changed files with 6 additions and 6 deletions

View File

@ -3,7 +3,7 @@ package com.me.asteroids.components;
import com.badlogic.gdx.math.Vector2;
import com.me.common.ecs.Component;
public class AccelerationComponent extends Component {
public class AccelerationComponent implements Component {
public Vector2 acceleration;

View File

@ -4,7 +4,7 @@ import com.badlogic.gdx.math.Polygon;
import com.badlogic.gdx.math.Rectangle;
import com.me.common.ecs.Component;
public class ModelComponent extends Component {
public class ModelComponent implements Component {
public Polygon model;
public Rectangle aabb;

View File

@ -2,6 +2,6 @@ package com.me.asteroids.components;
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.)
}

View File

@ -3,7 +3,7 @@ package com.me.asteroids.components;
import com.badlogic.gdx.math.Vector2;
import com.me.common.ecs.Component;
public class PositionComponent extends Component {
public class PositionComponent implements Component {
public Vector2 position;
public float rotation;

View File

@ -3,7 +3,7 @@ package com.me.asteroids.components;
import com.badlogic.gdx.math.Vector2;
import com.me.common.ecs.Component;
public class VelocityComponent extends Component {
public class VelocityComponent implements Component {
public Vector2 velocity;
public float maxVelocity;

View File

@ -1,5 +1,5 @@
package com.me.common.ecs;
public abstract class Component {
public interface Component {
}