Class RecycleDisplay
java.lang.Object
com.deco2800.game.components.Component
com.deco2800.game.rendering.RenderComponent
com.deco2800.game.ui.UIComponent
com.deco2800.game.components.foodAndwater.RecycleDisplay
- All Implemented Interfaces:
 Disposable,Renderable,java.lang.Comparable<Renderable>
public class RecycleDisplay extends UIComponent
A ui component for displaying recycle system.
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRecycleDisplay.recycleState - 
Field Summary
Fields Modifier and Type Field Description static booleanisKeystatic java.util.ArrayList<Image>recycleIconstatic intrecycleNumberstatic RecycleDisplay.recycleStaterecycleStatestatic Tabletable - 
Constructor Summary
Constructors Constructor Description RecycleDisplay() - 
Method Summary
Modifier and Type Method Description voidcreate()Creates reusable recycle ui styles and adds actors to the stage.voiddispose()remove recycleIcon by useing a for loopvoiddraw(SpriteBatch batch)Draw the renderable.voidupdate()Called once per frame of the game, and should be used for most component logic.voidupdateRecyleIconUI(int dis)Updates the recycle ui time by time conditions, pick up an item.Methods inherited from class com.deco2800.game.components.Component
earlyUpdate, getEntity, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate 
- 
Field Details
- 
recycleState
 - 
table
 - 
recycleIcon
 - 
recycleNumber
public static int recycleNumber - 
isKey
public static boolean isKey 
 - 
 - 
Constructor Details
- 
RecycleDisplay
public RecycleDisplay() 
 - 
 - 
Method Details
- 
create
public void create()Creates reusable recycle ui styles and adds actors to the stage. And starts the counting the time.- Overrides:
 createin classUIComponent
 - 
draw
Description copied from class:RenderComponentDraw the renderable. Should be called only by the renderer, not manually.- Specified by:
 drawin classRenderComponent- Parameters:
 batch- Batch to render to.
 - 
update
public void update()Description copied from class:ComponentCalled once per frame of the game, and should be used for most component logic. Not called if component is disabled. - 
updateRecyleIconUI
public void updateRecyleIconUI(int dis)Updates the recycle ui time by time conditions, pick up an item. - 
dispose
public void dispose()remove recycleIcon by useing a for loop- Specified by:
 disposein interfaceDisposable- Overrides:
 disposein classRenderComponent
 
 -