public class GameObject
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
int |
health |
InputComponent |
inputHandler |
boolean |
isAlive |
PhysicsComponent |
physics |
float |
scale |
Type |
type |
float |
x_Pos |
float |
y_Pos |
Constructor and Description |
---|
GameObject(InputComponent inputHandler,
PhysicsComponent physics,
Type type,
float x,
float y)
Creates a new Game Object
|
Modifier and Type | Method and Description |
---|---|
void |
update(double elapsedTime)
updates an object by processing input and handling physics
|
public InputComponent inputHandler
public PhysicsComponent physics
public Type type
public float x_Pos
public float y_Pos
public float scale
public int health
public boolean isAlive
public GameObject(InputComponent inputHandler, PhysicsComponent physics, Type type, float x, float y)
inputHandler
- The AI or User issued Commands to controll this objectphysics
- The component handling the physics and collisions of a objecttype
- Defines the type of the objectx
- The position along the x axisy
- The position along the y axis