Bandidos
Public Member Functions | Protected Member Functions | List of all members
com.mygdx.game.popUpSystem.BasePopUp Class Referenceabstract
Inheritance diagram for com.mygdx.game.popUpSystem.BasePopUp:
com.mygdx.game.engine.entities.BaseEntity com.mygdx.game.engine.events.EventDispatcher com.mygdx.game.popUps.BaseGamePopUp com.mygdx.game.popUps.EndScreenPopUp com.mygdx.game.popUps.PausePopUp

Public Member Functions

 BasePopUp (boolean isCoverPopUp)
 
boolean isCoverPopUp ()
 
boolean isTopPopUp ()
 
boolean isTopCoverPopUp ()
 
void system_setTopPopUp (boolean isTop)
 
void system_setTopCoverPopUp (boolean isTopCover)
 
void system_setLayer (int layer)
 
int getLayer ()
 
RenderComponent getRenderComponent ()
 
- Public Member Functions inherited from com.mygdx.game.engine.entities.BaseEntity
 BaseEntity ()
 
TransformComponent getTransformComponent ()
 
boolean hasInstanceOfComponent (BaseEntityComponent componentInstance)
 
void addTag (String tag)
 
void removeTag (String tag)
 
boolean hasTag (String tag)
 
void update (float dt)
 
void render (RenderComponents renderComponents)
 
void destroy ()
 
boolean isDestroyed ()
 
- Public Member Functions inherited from com.mygdx.game.engine.events.EventDispatcher
void addEventListener (String type, IEventReceiver listeningClass)
 
void dispatchEvent (Event event)
 
void removeEventListener (String type, IEventReceiver listener)
 
boolean hasEventListener (String type)
 
ArrayList< ListenerItemgetAllListeners ()
 
void destroyAllListeners ()
 
void clean ()
 

Protected Member Functions

void awake ()
 
void updated (float dt)
 
void rendered (RenderComponents renderComponents)
 
void destroyed ()
 
abstract void onPopUpDestroyed ()
 
abstract void onPopUpAwake ()
 
- Protected Member Functions inherited from com.mygdx.game.engine.entities.BaseEntity
abstract void awake ()
 
abstract void updated (float dt)
 
abstract void rendered (RenderComponents renderComponents)
 
abstract void destroyed ()
 

Detailed Description

This is the base class for all pop-ups. The pop-up will be rendered above all else. A cover pop-up will also change the touch layer. If a cover pop-up and you want to check for touch, you want to check with the 'getLayer()' method if the touch was in your layer If not a cover pop-up, you want to check if this is the current top pop-up to allow interaction

Author
Ramses Di Perna

Constructor & Destructor Documentation

◆ BasePopUp()

com.mygdx.game.popUpSystem.BasePopUp.BasePopUp ( boolean  isCoverPopUp)

This will create a pop-up which work side to side with the PopUpSystem singleton

Parameters
isCoverPopUpmeans that it will switch the touch layer of the touch channel. It will also render a black alpha cover under the pop up

Member Function Documentation

◆ awake()

void com.mygdx.game.popUpSystem.BasePopUp.awake ( )
protected

◆ destroyed()

void com.mygdx.game.popUpSystem.BasePopUp.destroyed ( )
protected

◆ getLayer()

int com.mygdx.game.popUpSystem.BasePopUp.getLayer ( )

Returns the touch layer which this pop-up is in.

Returns
touch layer index

◆ getRenderComponent()

RenderComponent com.mygdx.game.popUpSystem.BasePopUp.getRenderComponent ( )

Returns the RenderComponent of this pop-up

Returns
RenderComponent attached to this PopUp

◆ isCoverPopUp()

boolean com.mygdx.game.popUpSystem.BasePopUp.isCoverPopUp ( )

Returns whether this pop up is a cover pop up, when true, this pop-up also renders a black alpha cover under the pop up when it is the top cover pop up

◆ isTopCoverPopUp()

boolean com.mygdx.game.popUpSystem.BasePopUp.isTopCoverPopUp ( )

Returns whether this pop up is the top of all cover pop ups. Will return false also when its not a cover pop up

Returns
True when its the top Cover pop up, else false

◆ isTopPopUp()

boolean com.mygdx.game.popUpSystem.BasePopUp.isTopPopUp ( )

Returns whether this pop up is the current top pop up of all pop ups which are active on the screen.

Returns
True when its the top pop-up, else false.

◆ onPopUpAwake()

abstract void com.mygdx.game.popUpSystem.BasePopUp.onPopUpAwake ( )
abstractprotected

Triggered when the pop-up has been instantiated.

◆ onPopUpDestroyed()

abstract void com.mygdx.game.popUpSystem.BasePopUp.onPopUpDestroyed ( )
abstractprotected

Triggered when the pop-up has been destroyed

◆ rendered()

void com.mygdx.game.popUpSystem.BasePopUp.rendered ( RenderComponents  renderComponents)
protected

◆ system_setLayer()

void com.mygdx.game.popUpSystem.BasePopUp.system_setLayer ( int  layer)

Warning: This method may only be called by the PopUpSystem This will set the layer in which the pop-up is currently in.

Parameters
layerwhich represents the touch layer of the pop-up

◆ system_setTopCoverPopUp()

void com.mygdx.game.popUpSystem.BasePopUp.system_setTopCoverPopUp ( boolean  isTopCover)

Warning: This method may only be called by the PopUpSystem This method will set this pop-up to the top cover pop up

Parameters
isTopCoverindicates if this popUp is the current highest cover pop-up on the stack

◆ system_setTopPopUp()

void com.mygdx.game.popUpSystem.BasePopUp.system_setTopPopUp ( boolean  isTop)

Warning: This method may only be called by the PopUpSystem This method will set this pop-up to the top pop up

Parameters
isTopindicates if this popUp is the current top pop-up

◆ updated()

void com.mygdx.game.popUpSystem.BasePopUp.updated ( float  dt)
protected

The documentation for this class was generated from the following file: