Bandidos
|
Public Member Functions | |
BaseGridNavigationComponent (Grid grid, String gridOccupyTag, int xSize, int ySize) | |
void | addUnwalkableOccupyTag (String tag) |
boolean | hasUnwalkableOccupyTag (String tag) |
void | removeUnwalkableOccupyTag (String tag) |
Public Member Functions inherited from com.mygdx.game.components.GridUserComponent | |
GridUserComponent (Grid grid, String gridOccupyTag, int xSize, int ySize) | |
GridUserComponent (Grid grid, String[] gridOccupyTags, int xSize, int ySize) | |
GridTile | getCurrentLocatedTile () |
boolean | isLocated () |
int | getLocationX () |
int | getLocationY () |
void | placeSelfOnLocation (int x, int y) |
void | removeSelfFromLocation () |
Collection< String > | getGridOccupyTags () |
void | addGridOccupyTag (String tag) |
void | removeGridOccupyTag (String tag) |
boolean | hasGridOccupyTag (String tag) |
void | awake () |
Public Member Functions inherited from com.mygdx.game.engine.entities.components.BaseEntityComponent | |
EngineTween | startTweenOnComponent (Tween tween, TweenStartType tweenStartType) |
Timeline | startTimelineOnComponent (Timeline timeline, boolean updateInGameTime) |
EngineTween | doFloat (TweenableFloat floatToTween, float newValue, float duration, TweenStartType tweenStartType) |
void | stopAllComponentTweens () |
void | initialize (BaseEntity parentEntity) |
BaseEntity | getParentOfComponent () |
boolean | isActive () |
boolean | isDestroyed () |
void | setActiveState (boolean activeState) |
void | destroy () |
void | update (float deltaTime) |
abstract void | awake () |
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 () |
Protected Member Functions | |
Vector2 | getNewTargetTile (float sideStepChance) |
Vector2 | getSideStep () |
Vector2 | getTargetPosition () |
boolean | canWalkOnTile (int tileX, int tileY) |
Vector2 | getWalkableTileOnRow (int yRow) |
boolean | hasAnyUnwalkableOccupyTag (GridTile tile) |
Protected Member Functions inherited from com.mygdx.game.components.GridUserComponent | |
Grid | getGrid () |
void | destroyed () |
void | updated (float deltaTime) |
void | activeStateChanged () |
Protected Member Functions inherited from com.mygdx.game.engine.entities.components.BaseEntityComponent | |
abstract void | updated (float deltaTime) |
abstract void | destroyed () |
abstract void | activeStateChanged () |
Additional Inherited Members | |
Static Public Attributes inherited from com.mygdx.game.components.GridUserComponent | |
static final int | NOT_LOCATED_VALUE = -1337 |
All which extend this class have full access to the navigation abilities on the grid and its own position.
com.mygdx.game.components.BaseGridNavigationComponent.BaseGridNavigationComponent | ( | Grid | grid, |
String | gridOccupyTag, | ||
int | xSize, | ||
int | ySize | ||
) |
void com.mygdx.game.components.BaseGridNavigationComponent.addUnwalkableOccupyTag | ( | String | tag | ) |
And a tag this instance can not walk over in its orientation.
tag | represents the occupytag which it can not navigate over. |
|
protected |
Check whether the given tile is walkable for this navigator
tileX | indicates the x position of the tile on the grid (In Grid position) |
tileY | indicates the y position of the tile on the grid (In Grid position) |
|
protected |
Looks for a new target tile from its current location, here it will keep in account the side stepping, forward stepping and row searching in order to find an open tile.
|
protected |
Returns a random side step if able to. It will only return null when both side steps are not able to be done (Side means diagonal downwards)
|
protected |
Gets a world position on the current occupying tile.
|
protected |
Returns the tile grid location of a walkable tile on the given y row
yRow | to check for walkable tile |
|
protected |
Returns whether this component holds any of the occupy tags the given tile has as 'Unwalkable'
tile | to check if its unwalkable in form of tags |
boolean com.mygdx.game.components.BaseGridNavigationComponent.hasUnwalkableOccupyTag | ( | String | tag | ) |
Checks whether this instance has the given tag as tag it can not walk over.
tag | to check |
void com.mygdx.game.components.BaseGridNavigationComponent.removeUnwalkableOccupyTag | ( | String | tag | ) |
Removes a tag which it has set as unwalkable occupy tag
tag | to remove from the unwalkable occupy tag list. |