Package com.csse3200.game.components.npc
Class EngineerMenuComponent
java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.rendering.RenderComponent
com.csse3200.game.ui.UIComponent
com.csse3200.game.components.npc.EngineerMenuComponent
- All Implemented Interfaces:
- com.badlogic.gdx.utils.Disposable,- Renderable,- Comparable<Renderable>
- 
Field SummaryFields inherited from class com.csse3200.game.ui.UIComponentskin, stage
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidcreate()Called when the entity is created and registered.voidcreateMenu(float x, float y, com.badlogic.gdx.graphics.Camera camera) Creates a menu for the engineervoiddraw(com.badlogic.gdx.graphics.g2d.SpriteBatch batch) Draw the renderable.voidRemoves the menu from the stageMethods inherited from class com.csse3200.game.ui.UIComponentgetLayer, getZIndexMethods inherited from class com.csse3200.game.rendering.RenderComponentcompareTo, dispose, renderMethods inherited from class com.csse3200.game.components.ComponentearlyUpdate, getEntity, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, updateMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.ComparablecompareToMethods inherited from interface com.csse3200.game.rendering.Renderablerender
- 
Constructor Details- 
EngineerMenuComponentpublic EngineerMenuComponent()
 
- 
- 
Method Details- 
createpublic void create()Description copied from class:ComponentCalled when the entity is created and registered. Initial logic such as calls to GetComponent should be made here, not in the constructor which is called before an entity is finished.- Overrides:
- createin class- UIComponent
 
- 
drawpublic void draw(com.badlogic.gdx.graphics.g2d.SpriteBatch batch) Description copied from class:RenderComponentDraw the renderable. Should be called only by the renderer, not manually.- Specified by:
- drawin class- RenderComponent
- Parameters:
- batch- Batch to render to.
 
- 
createMenupublic void createMenu(float x, float y, com.badlogic.gdx.graphics.Camera camera) Creates a menu for the engineer- Parameters:
- x- cursor x coordinate
- y- cursor y coordinate
- camera- camera of the game
 
- 
removeMenupublic void removeMenu()Removes the menu from the stage
 
-