Bandidos
|
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< ListenerItem > | getAllListeners () |
void | destroyAllListeners () |
void | clean () |
Static Public Attributes | |
static String | EVENT_BASE_DESTROYED = "PlayerBaseDestroyedEvent" |
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.
com.mygdx.game.level.Playfield.Playfield | ( | ILevelBlueprint | blueprint | ) |
Creates a level with the given blueprint.
blueprint | to create a level with |
void com.mygdx.game.level.Playfield.countForResetTraps | ( | ) |
Counts a tick for all the traps in order for them to reset on their own pace.
void com.mygdx.game.level.Playfield.createLevel | ( | ILevelBlueprint | blueprint | ) |
Creates a level with the given blueprint.
blueprint | to create a level with |
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
void com.mygdx.game.level.Playfield.forceDisableTraps | ( | ) |
void com.mygdx.game.level.Playfield.forceResetTraps | ( | ) |
Forces all traps in the level to reset.
Grid com.mygdx.game.level.Playfield.getGrid | ( | ) |
ILevelBlueprint com.mygdx.game.level.Playfield.getLevelBlueprint | ( | ) |
PlayerBase com.mygdx.game.level.Playfield.getPlayerBase | ( | ) |
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.
event | which has one of the event types which is listened to. |
Implements com.mygdx.game.engine.events.IEventReceiver.
void com.mygdx.game.level.Playfield.render | ( | RenderComponents | rcs, |
boolean | debugRender | ||
) |
void com.mygdx.game.level.Playfield.update | ( | float | dt | ) |
|
static |