Package cs.eng1.piazzapanic.stations
Class RecipeStation
- java.lang.Object
-
- com.badlogic.gdx.scenes.scene2d.Actor
-
- cs.eng1.piazzapanic.stations.Station
-
- cs.eng1.piazzapanic.stations.RecipeStation
-
-
Field Summary
Fields Modifier and Type Field Description protected int
bunCount
protected int
lettuceCount
protected int
pattyCount
protected int
tomatoCount
-
Fields inherited from class cs.eng1.piazzapanic.stations.Station
actionAlignment, chefSubjects, id, inUse, nearbyChef, stationImage, uiController
-
-
Constructor Summary
Constructors Constructor Description RecipeStation(int id, com.badlogic.gdx.graphics.g2d.TextureRegion textureRegion, StationUIController stationUIController, StationActionUI.ActionAlignment alignment, FoodTextureManager textureManager, CustomerManager customerManager)
The constructor method for the class
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doStationAction(StationAction.ActionType action)
Given an action, the station should attempt to do that action based on the chef that is nearby or what ingredient(s) are currently on the station.void
draw(com.badlogic.gdx.graphics.g2d.Batch batch, float parentAlpha)
Displays ingredients that have been placed on the stationjava.util.List<StationAction.ActionType>
getActionTypes()
Obtains the actions that can be currently performed depending on the states of the station itself and the selected chefvoid
reset()
Reset the station values to be the default.void
updateOrderActions()
Updates the current available actions based on the new customer's order-
Methods inherited from class cs.eng1.piazzapanic.stations.Station
addSubject, deregisterFromAllSubjects, drawDebug, drawFoodTexture, getActionAlignment, getId, getSubjects, removeSubject, setImageRotation, update
-
Methods inherited from class com.badlogic.gdx.scenes.scene2d.Actor
act, addAction, addCaptureListener, addListener, ancestorsVisible, ascendantsVisible, clear, clearActions, clearListeners, clipBegin, clipBegin, clipEnd, debug, drawDebugBounds, fire, firstAscendant, getActions, getCaptureListeners, getColor, getDebug, getHeight, getListeners, getName, getOriginX, getOriginY, getParent, getRight, getRotation, getScaleX, getScaleY, getStage, getTop, getTouchable, getUserObject, getWidth, getX, getX, getY, getY, getZIndex, hasActions, hasKeyboardFocus, hasParent, hasScrollFocus, hit, isAscendantOf, isDescendantOf, isTouchable, isTouchFocusListener, isTouchFocusTarget, isVisible, localToActorCoordinates, localToAscendantCoordinates, localToParentCoordinates, localToScreenCoordinates, localToStageCoordinates, moveBy, notify, parentToLocalCoordinates, positionChanged, remove, removeAction, removeCaptureListener, removeListener, rotateBy, rotationChanged, scaleBy, scaleBy, scaleChanged, screenToLocalCoordinates, setBounds, setColor, setColor, setDebug, setHeight, setName, setOrigin, setOrigin, setOriginX, setOriginY, setParent, setPosition, setPosition, setRotation, setScale, setScale, setScaleX, setScaleY, setSize, setStage, setTouchable, setUserObject, setVisible, setWidth, setX, setX, setY, setY, setZIndex, sizeBy, sizeBy, sizeChanged, stageToLocalCoordinates, toBack, toFront, toString
-
-
-
-
Constructor Detail
-
RecipeStation
public RecipeStation(int id, com.badlogic.gdx.graphics.g2d.TextureRegion textureRegion, StationUIController stationUIController, StationActionUI.ActionAlignment alignment, FoodTextureManager textureManager, CustomerManager customerManager)
The constructor method for the class- Parameters:
id
- The unique identifier of the stationtextureRegion
- The rectangular area of the texturestationUIController
- The controller from which we can get show and hide the action buttons belonging to the stationalignment
- Dictates where the action buttons are showntextureManager
- The controller from which we can get information on what texture each ingredient should havecustomerManager
- The controller from which we can get information on what food needs to be served
-
-
Method Detail
-
reset
public void reset()
Description copied from class:Station
Reset the station values to be the default.
-
getActionTypes
public java.util.List<StationAction.ActionType> getActionTypes()
Obtains the actions that can be currently performed depending on the states of the station itself and the selected chef- Overrides:
getActionTypes
in classStation
- Returns:
- actionTypes - the list of actions the station can currently perform.
-
doStationAction
public void doStationAction(StationAction.ActionType action)
Given an action, the station should attempt to do that action based on the chef that is nearby or what ingredient(s) are currently on the station.- Overrides:
doStationAction
in classStation
- Parameters:
action
- the action that needs to be done by this station if it can.
-
draw
public void draw(com.badlogic.gdx.graphics.g2d.Batch batch, float parentAlpha)
Displays ingredients that have been placed on the station
-
updateOrderActions
public void updateOrderActions()
Updates the current available actions based on the new customer's order
-
-