com.TeamHEC.LocomotionCommotion.Goal
Class GoalActor

java.lang.Object
  extended by com.badlogic.gdx.scenes.scene2d.Actor
      extended by com.TeamHEC.LocomotionCommotion.Goal.GoalActor

public class GoalActor
extends com.badlogic.gdx.scenes.scene2d.Actor

Author:
Robert Precious The Goal Actor is used in the goal menu and in playergoal's meaning it needs to keep track of which one it is. It can also be empty which mean it shows a blank texture and does nothing. This is an Actor- meaning it's given texture is displayed on the stage and actions (acts) can be performed.

Field Summary
 int index
           
 
Constructor Summary
GoalActor(int actorY, int actorX, boolean empty, Goal goal)
           
 
Method Summary
 void act(float delta)
           
 void draw(com.badlogic.gdx.graphics.g2d.Batch batch, float alpha)
           
 Goal getGoal()
          Gets the goal assigned to the goal actor
 int getIndex()
          Gets the goals index
 float getX()
          Gets the X coordinated of the actor
 float getY()
          Gets the Y coordinate for the actor
 boolean isEmpty()
          Returns if the goal actor is empty
 boolean isOwnedgoal()
          Gets if the goal is owned
 boolean isPlanRouteButtonVisible()
          gets if the route plan button is visible
 void refreshBounds()
           
 void setEmpty(java.lang.Boolean empty)
          When we set empty we set the value AND change the texture to the relevant texture;
 void setGoal(Goal goal)
          Sets the goal for the goal actor
 void setIndex(int i)
          Sets the goal's index
 void setOwnedgoal(boolean ownedgoal)
          Sets if a goal has an owner
 void setPlanRouteButtonVisible(boolean planRouteButtonVisible)
          Sets of the route plan button is visible
 void setX(float x)
          Sets the X coordinate of the actor
 void setY(float y)
          Sets the Y coordinate of the goal actor
 
Methods inherited from class com.badlogic.gdx.scenes.scene2d.Actor
addAction, addCaptureListener, addListener, clear, clearActions, clearListeners, clipBegin, clipBegin, clipEnd, debug, drawDebug, fire, getActions, getCaptureListeners, getColor, getDebug, getHeight, getListeners, getName, getOriginX, getOriginY, getParent, getRight, getRotation, getScaleX, getScaleY, getStage, getTop, getTouchable, getUserObject, getWidth, getX, getY, getZIndex, hasParent, hit, isAscendantOf, isDescendantOf, isTouchable, isVisible, localToAscendantCoordinates, localToParentCoordinates, localToStageCoordinates, moveBy, notify, parentToLocalCoordinates, remove, removeAction, removeCaptureListener, removeListener, rotateBy, scaleBy, scaleBy, screenToLocalCoordinates, setBounds, setColor, setColor, setDebug, setHeight, setName, setOrigin, setOrigin, setOriginX, setOriginY, setPosition, setPosition, setRotation, setScale, setScale, setScaleX, setScaleY, setSize, setTouchable, setUserObject, setVisible, setWidth, setZIndex, sizeBy, sizeBy, stageToLocalCoordinates, toBack, toFront, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

index

public int index
Constructor Detail

GoalActor

public GoalActor(int actorY,
                 int actorX,
                 boolean empty,
                 Goal goal)
Method Detail

draw

public void draw(com.badlogic.gdx.graphics.g2d.Batch batch,
                 float alpha)
Overrides:
draw in class com.badlogic.gdx.scenes.scene2d.Actor

act

public void act(float delta)
Overrides:
act in class com.badlogic.gdx.scenes.scene2d.Actor

isEmpty

public boolean isEmpty()
Returns if the goal actor is empty

Returns:
Boolean empty

setEmpty

public void setEmpty(java.lang.Boolean empty)
When we set empty we set the value AND change the texture to the relevant texture;

Parameters:
empty - - Boolean for whether or not the Goal Actor has an assigned goal.

setGoal

public void setGoal(Goal goal)
Sets the goal for the goal actor

Parameters:
goal -

getGoal

public Goal getGoal()
Gets the goal assigned to the goal actor

Returns:
Goal

setX

public void setX(float x)
Sets the X coordinate of the actor

Overrides:
setX in class com.badlogic.gdx.scenes.scene2d.Actor
Parameters:
x - the x-coordinate of the goal actor on the screen

setY

public void setY(float y)
Sets the Y coordinate of the goal actor

Overrides:
setY in class com.badlogic.gdx.scenes.scene2d.Actor
Parameters:
y - the y-coordinate of the goal actor on the screen

getX

public float getX()
Gets the X coordinated of the actor

Overrides:
getX in class com.badlogic.gdx.scenes.scene2d.Actor
Returns:
the x-coordinate of the goal actor on the screen

getY

public float getY()
Gets the Y coordinate for the actor

Overrides:
getY in class com.badlogic.gdx.scenes.scene2d.Actor
Returns:
the y-coordinate of the goal actor on the screen

getIndex

public int getIndex()
Gets the goals index

Returns:
Int index

setIndex

public void setIndex(int i)
Sets the goal's index

Parameters:
i -

isPlanRouteButtonVisible

public boolean isPlanRouteButtonVisible()
gets if the route plan button is visible

Returns:
Boolean button visible

setPlanRouteButtonVisible

public void setPlanRouteButtonVisible(boolean planRouteButtonVisible)
Sets of the route plan button is visible

Parameters:
planRouteButtonVisible -

isOwnedgoal

public boolean isOwnedgoal()
Gets if the goal is owned

Returns:
Boolean owned goal

setOwnedgoal

public void setOwnedgoal(boolean ownedgoal)
Sets if a goal has an owner

Parameters:
ownedgoal -

refreshBounds

public void refreshBounds()