Bandidos
Public Member Functions | Static Public Attributes | List of all members
com.mygdx.game.level.Playfield Class Reference
Inheritance diagram for com.mygdx.game.level.Playfield:
com.mygdx.game.engine.events.EventDispatcher com.mygdx.game.engine.events.IEventReceiver

Public Member Functions

 Playfield (ILevelBlueprint blueprint)
 
void createLevel (ILevelBlueprint blueprint)
 
void destroyLevel ()
 
void countForResetTraps ()
 
void forceResetTraps ()
 
void forceDisableTraps ()
 
void update (float dt)
 
void render (RenderComponents rcs, boolean debugRender)
 
ILevelBlueprint getLevelBlueprint ()
 
PlayerBase getPlayerBase ()
 
Grid getGrid ()
 
void onReceiveEvent (Event event)
 
- 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 ()
 

Static Public Attributes

static String EVENT_BASE_DESTROYED = "PlayerBaseDestroyedEvent"
 

Detailed Description

This class represents the entire Playfield which the game is played on. This class creates and holds the grid, the PlayerBase and the level created with the given ILevelBlueprint. This class with also dispatch an even when the base has been destroyed.

Author
Ramses Di Perna

Constructor & Destructor Documentation

◆ Playfield()

com.mygdx.game.level.Playfield.Playfield ( ILevelBlueprint  blueprint)

Creates a level with the given blueprint.

Parameters
blueprintto create a level with

Member Function Documentation

◆ countForResetTraps()

void com.mygdx.game.level.Playfield.countForResetTraps ( )

Counts a tick for all the traps in order for them to reset on their own pace.

◆ createLevel()

void com.mygdx.game.level.Playfield.createLevel ( ILevelBlueprint  blueprint)

Creates a level with the given blueprint.

Parameters
blueprintto create a level with

◆ destroyLevel()

void com.mygdx.game.level.Playfield.destroyLevel ( )

Destroys the level which was created with the ILevelBlueprint using the 'createLevel' method Including the grid and playerbase

◆ forceDisableTraps()

void com.mygdx.game.level.Playfield.forceDisableTraps ( )

◆ forceResetTraps()

void com.mygdx.game.level.Playfield.forceResetTraps ( )

Forces all traps in the level to reset.

◆ getGrid()

Grid com.mygdx.game.level.Playfield.getGrid ( )

◆ getLevelBlueprint()

ILevelBlueprint com.mygdx.game.level.Playfield.getLevelBlueprint ( )

◆ getPlayerBase()

PlayerBase com.mygdx.game.level.Playfield.getPlayerBase ( )

◆ onReceiveEvent()

void com.mygdx.game.level.Playfield.onReceiveEvent ( Event  event)

This will be triggered when an event has been fired of type which this implementing class was listening to.

Parameters
eventwhich has one of the event types which is listened to.

Implements com.mygdx.game.engine.events.IEventReceiver.

◆ render()

void com.mygdx.game.level.Playfield.render ( RenderComponents  rcs,
boolean  debugRender 
)

◆ update()

void com.mygdx.game.level.Playfield.update ( float  dt)

Member Data Documentation

◆ EVENT_BASE_DESTROYED

String com.mygdx.game.level.Playfield.EVENT_BASE_DESTROYED = "PlayerBaseDestroyedEvent"
static

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