Class OrientationComponent
java.lang.Object
com.deco2800.game.components.Component
com.deco2800.game.components.infrastructure.OrientationComponent
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionOrientationComponent
(int orientation) orientation component constructor initializes entity orientation -
Method Summary
Modifier and TypeMethodDescriptionint
get the orientation of the entityvoid
setOrientation
(int orientation) set the orientation of a structureMethods inherited from class com.deco2800.game.components.Component
create, dispose, earlyUpdate, getEntity, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, update
-
Constructor Details
-
OrientationComponent
public OrientationComponent(int orientation) orientation component constructor initializes entity orientation- Parameters:
orientation
- of the entity 0 or 1
-
-
Method Details
-
getOrientation
public int getOrientation()get the orientation of the entity- Returns:
- orientation of the entity 0 or 1
-
setOrientation
public void setOrientation(int orientation) set the orientation of a structure- Parameters:
orientation
- of a structure 0 or 1
-