com.TeamHEC.LocomotionCommotion.MapActors
Class Game_Map_MapObj

java.lang.Object
  extended by com.badlogic.gdx.scenes.scene2d.Actor
      extended by com.TeamHEC.LocomotionCommotion.MapActors.Game_Map_MapObj
Direct Known Subclasses:
Game_Map_Junction, Game_Map_Station

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


Field Summary
 float actorX
           
 float actorY
           
 boolean highlighted
           
 float offset
           
 boolean started
           
 com.badlogic.gdx.graphics.Texture texture
           
 com.badlogic.gdx.graphics.Texture toggleTexture1
           
 com.badlogic.gdx.graphics.Texture toggleTexture2
           
 
Constructor Summary
Game_Map_MapObj(float x, float y, com.badlogic.gdx.graphics.Texture texture, com.badlogic.gdx.graphics.Texture toggleTexture2)
           
 
Method Summary
 void draw(com.badlogic.gdx.graphics.g2d.Batch batch, float alpha)
           
 Connection getRouteConnection()
          Gets the route connection
 Train getRouteTrain()
          gets the train on the route
 void hideInfoBox()
           
 boolean routeAvailable()
          get if the route is availible
 void setRouteAvailable(boolean available)
          Sets if the route is availible
 void setRouteAvailable(Train train, Connection connection)
          sets the route and of the route is availible
 void showInfoBox()
           
 void toggleHighlight(boolean highlighted)
          toggles if an onject is highlighted
 
Methods inherited from class com.badlogic.gdx.scenes.scene2d.Actor
act, 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, getX, getY, 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, setX, setY, setZIndex, sizeBy, sizeBy, stageToLocalCoordinates, toBack, toFront, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

texture

public com.badlogic.gdx.graphics.Texture texture

toggleTexture1

public com.badlogic.gdx.graphics.Texture toggleTexture1

toggleTexture2

public com.badlogic.gdx.graphics.Texture toggleTexture2

actorX

public float actorX

actorY

public float actorY

started

public boolean started

highlighted

public boolean highlighted

offset

public float offset
Constructor Detail

Game_Map_MapObj

public Game_Map_MapObj(float x,
                       float y,
                       com.badlogic.gdx.graphics.Texture texture,
                       com.badlogic.gdx.graphics.Texture toggleTexture2)
Method Detail

showInfoBox

public void showInfoBox()

hideInfoBox

public void hideInfoBox()

routeAvailable

public boolean routeAvailable()
get if the route is availible

Returns:
Boolean availible

setRouteAvailable

public void setRouteAvailable(boolean available)
Sets if the route is availible

Parameters:
available -

setRouteAvailable

public void setRouteAvailable(Train train,
                              Connection connection)
sets the route and of the route is availible

Parameters:
train -
connection -

getRouteTrain

public Train getRouteTrain()
gets the train on the route

Returns:
Train route train

getRouteConnection

public Connection getRouteConnection()
Gets the route connection

Returns:
Connection route connection

toggleHighlight

public void toggleHighlight(boolean highlighted)
toggles if an onject is highlighted

Parameters:
highlighted -

draw

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