com.TeamHEC.LocomotionCommotion.MapActors
Class Game_Map_Station

java.lang.Object
  extended by com.badlogic.gdx.scenes.scene2d.Actor
      extended by com.TeamHEC.LocomotionCommotion.MapActors.Game_Map_MapObj
          extended by com.TeamHEC.LocomotionCommotion.MapActors.Game_Map_Station
All Implemented Interfaces:
StationListener

public class Game_Map_Station
extends Game_Map_MapObj
implements StationListener

This class is the UI View for stations on the map.

Author:
Oliver Binns

Field Summary
 float offset
           
 boolean owned
           
 
Fields inherited from class com.TeamHEC.LocomotionCommotion.MapActors.Game_Map_MapObj
actorX, actorY, highlighted, started, texture, toggleTexture1, toggleTexture2
 
Constructor Summary
Game_Map_Station(Station station, float actorX, float actorY)
           
 
Method Summary
 Station getStation()
          Returns the station
 void hideInfoBox()
          hides the info box for a station
 void ownerChanged(Station station, Player player)
          Deprecated. please use update button method instead
 void setOwned(java.lang.Boolean b)
          sets if a station is owned
 void showInfoBox(boolean faulty)
          show the info box for a selected station
 void updateButton(Station station, Player player)
          Update the button texture according to owner and faults
 
Methods inherited from class com.TeamHEC.LocomotionCommotion.MapActors.Game_Map_MapObj
draw, getRouteConnection, getRouteTrain, routeAvailable, setRouteAvailable, setRouteAvailable, showInfoBox, toggleHighlight
 
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

owned

public boolean owned

offset

public float offset
Constructor Detail

Game_Map_Station

public Game_Map_Station(Station station,
                        float actorX,
                        float actorY)
Method Detail

getStation

public Station getStation()
Returns the station

Returns:
Station

updateButton

public void updateButton(Station station,
                         Player player)
Update the button texture according to owner and faults

Specified by:
updateButton in interface StationListener
Parameters:
station - the station which has changed owner
player - the new owner of the station

ownerChanged

public void ownerChanged(Station station,
                         Player player)
Deprecated. please use update button method instead

Description copied from interface: StationListener
Method has been replaced with updateButton method which takes the same parameters. Update button is a more appropriate name as faults are now supported by this method.

Specified by:
ownerChanged in interface StationListener
Parameters:
station - the station which has changed owner
player - the new owner of the station

showInfoBox

public void showInfoBox(boolean faulty)
show the info box for a selected station

Parameters:
faulty -

hideInfoBox

public void hideInfoBox()
hides the info box for a station

Overrides:
hideInfoBox in class Game_Map_MapObj

setOwned

public void setOwned(java.lang.Boolean b)
sets if a station is owned

Parameters:
b - set true if this station is owned