|
||||||||||
PREV NEXT | FRAMES NO FRAMES |
Packages that use Location | |
---|---|
ch.aplu.jcardgame | Addon package of the JGameGrid framework for developing card game applications. |
ch.aplu.jgamegrid | Package of the JGameGrid framework for developing simulations and games with a focus on education. |
Uses of Location in ch.aplu.jcardgame |
---|
Methods in ch.aplu.jcardgame with parameters of type Location | |
---|---|
void |
CardAdapter.atTarget(Card card,
Location targetLocation)
Triggered when a card arrives a the target after a card transfer. |
void |
CardListener.atTarget(Card card,
Location targetLocation)
Triggered when a card arrives a the target after a card transfer. |
void |
Hand.drawArced(Location center,
double radius,
double startDir,
double endDir,
double scaleFactor)
Same as drawArced(center, radius, startDir, endDir, scaleFactor, delay) with delay = 0 (no animation). |
void |
Hand.drawArced(Location center,
double radius,
double startDir,
double endDir,
double scaleFactor,
int delay)
Displays the cards in a arc with given center, radius, start and maximal end angle. |
void |
Hand.drawInColumn(Location handLocation,
int columnHeight,
double scaleFactor,
double rotationAngle)
Same as drawInColumn(handLocation, columnHeight, scaleFactor, rotationAngle, delay) with delay = 0 (no animation). |
void |
Hand.drawInColumn(Location handLocation,
int columnHeight,
double scaleFactor,
double rotationAngle,
int delay)
Displays the cards in a column with given maximal height. |
void |
Hand.drawInRow(Location handLocation,
int rowWidth,
double scaleFactor,
double rotationAngle)
Same as drawInRow(handLocation, rowWidth, scaleFactor, rotationAngle, delay) with delay = 0 (no animation). |
void |
Hand.drawInRow(Location handLocation,
int rowWidth,
double scaleFactor,
double rotationAngle,
int delay)
Displays the cards in a row with given maximal width. |
void |
Hand.drawStacked(Location handLocation,
double scaleFactor,
double rotationAngle)
Displays the cards in a stacked pile (only the top card is visible). |
void |
Hand.setTargetArea(Location targetLocation)
Same as setTargetArea(targetLocation, cardOrientation, slideStep) with cardOrientation = CardOrientation.NORTH, slideStep = 10 and onTop = true. |
void |
Hand.setTargetArea(Location targetLocation,
Hand.CardOrientation cardOrientation)
Same as setTargetArea(targetLocation, cardOrientation, slideStep) with slideStep = 10 and onTop = true. |
void |
Hand.setTargetArea(Location targetLocation,
Hand.CardOrientation cardOrientation,
int slideStep)
Same as setTargetArea(targetLocation, cardOrientation, slideStep) with onTop = true. |
void |
Hand.setTargetArea(Location targetLocation,
Hand.CardOrientation cardOrientation,
int slideStep,
boolean onTop)
Sets the transferring attributes for all cards in the current hand. |
void |
Card.slideToTarget(Location targetLocation,
int slideStep)
Same as slideToTarget(targetLocation, slideStep, blocking) with blocking = true. |
void |
Card.slideToTarget(Location targetLocation,
int slideStep,
boolean blocking)
If the card is handless and visible, moves the card actor from current location to the given location using the given number of steps per GameGrid's simulation cycle. |
void |
CardCover.slideToTarget(Location targetLocation,
int slideStep,
boolean onTop,
boolean blocking)
Slides the card cover actor from the current location to the given target location using the given step. |
Constructors in ch.aplu.jcardgame with parameters of type Location | |
---|---|
CardCover(GameGrid gameGrid,
Location location,
Deck deck,
double scaleFactor,
double rotationAngle)
Same as CardCover(gameGrid, location, deck, scaleFactor, rotationAngle, hide) with show = true. |
|
CardCover(GameGrid gameGrid,
Location location,
Deck deck,
double scaleFactor,
double rotationAngle,
boolean show)
Creates a transformed card cover actor from the seed actor of the first card in the given deck and adds it at the given location to the given game grid. |
Uses of Location in ch.aplu.jgamegrid |
---|
Methods in ch.aplu.jgamegrid that return Location | |
---|---|
Location |
Location.clone()
Returns a new location with the duplicated coordinates. |
Location |
Location.getAdjacentLocation(double direction)
Same as getAdjacentLocation(double direction, 5). |
Location |
Location.getAdjacentLocation(double direction,
int distance)
Gets the adjacent location of a cell where an displacement arrow from the current center of the current cell with given direction and length = (distance + epsilon) * cellSize ends up. |
Location |
Location.getAdjacentLocation(Location.CompassDirection compassDir)
Same as getAdjacentLocation(double direction, 5) with given compass direction. |
Location |
Location.getAdjacentLocation(Location.CompassDirection compassDir,
int distance)
Same as getAdjacentLocation(double direction, int distance) with given compass direction. |
Location |
GGMaze.getExitLocation()
Returns the location of the exit cell. |
Location |
Actor.getLocation()
Returns the current location (horizontal and vertical coordinates). |
Location |
Actor.getLocationStart()
Returns the start location (horizontal and vertical coordinates). |
Location |
GameGrid.getMouseLocation()
Returns the cell location of the cell under the mouse pointer or null, if the game grid is not visible or obscured by another window. |
Location |
Location.getNeighbourLocation(double direction)
Gets one of the 8 surrounding cells in given direction 45 degrees wide. |
Location |
Location.getNeighbourLocation(Location.CompassDirection compassDir)
Gets one of the 8 surrounding cells in the given compass directions. |
Location |
Actor.getNextMoveLocation()
Returns the target location of the next move(). |
Location |
GameGrid.getRandomEmptyLocation()
Returns an empty random location within the game grid. |
Location |
GameGrid.getRandomLocation()
Returns a random location within the game grid. |
Location |
GGMaze.getStartLocation()
Returns the location of the entry cell. |
Location |
GameGrid.toLocation(int x,
int y)
Returns the location (cell indices) of the cell where the point with given coordinates resides. |
Location |
GameGrid.toLocation(java.awt.Point pt)
Returns the location (cell indices) of the cell where the given point resides. |
Location |
GameGrid.toLocationInGrid(int x,
int y)
Returns the location (cell indices) of the cell where the point with given coordinates resides. |
Location |
GameGrid.toLocationInGrid(java.awt.Point pt)
Returns the location (cell indices) of the cell where the given point resides. |
Methods in ch.aplu.jgamegrid that return types with arguments of type Location | |
---|---|
java.util.ArrayList<Location> |
Actor.getCollisionTiles()
Returns a list of tile locations that are collision candidates. |
java.util.ArrayList<Location> |
GameGrid.getDiagonalLocations(Location location,
boolean up)
Returns a list of all grid locations that are on the diagonal line through the given location. |
java.util.ArrayList<Location> |
GameGrid.getEmptyLocations()
Returns a list of all locations not occupied by actors. |
java.util.ArrayList<Location> |
Location.getNeighbourLocations(double distance)
Returns all locations in a specified distance. |
java.util.ArrayList<Location> |
GameGrid.getOccupiedLocations()
Returns a list of all locations occupied by actors. |
Methods in ch.aplu.jgamegrid with parameters of type Location | |
---|---|
void |
GameGrid.addActor(Actor actor,
Location location)
Same as addActor(Actor actor, Location location, double direction) with direction = 0 (to east). |
void |
GameGrid.addActor(Actor actor,
Location location,
double direction)
Add a new actor at given starting position with given moving direction to the scene. |
void |
GameGrid.addActor(Actor actor,
Location location,
Location.CompassDirection compassDir)
Same as addActor(Actor actor, Location location, double direction) with compass direction. |
void |
GameGrid.addActorNoRefresh(Actor actor,
Location location)
Same as addActor(Actor actor, Location location), but the game grid window is not refreshed automatically. |
void |
GameGrid.addActorNoRefresh(Actor actor,
Location location,
double direction)
Same as addActor(Actor actor, Location location, double direction), but the game grid window is not refreshed automatically. |
void |
Actor.addCollisionTile(Location location)
Registers a tile location that becomes a collision candidate, e.g. that is checked for collisions in every simulation cycle. |
int |
Actor.collide(Actor actor,
Location location)
Empty implementation of a GGTileCollisionListener called when the an actor collides with a tile. |
int |
GGTileCollisionListener.collide(Actor actor,
Location location)
Event callback method called when actors and tiles are colliding. |
boolean |
Location.equals(Location location)
Checks whether the x-y-coordinates of the given location are equal to the x-y-coordinates of the current location. |
void |
GGBackground.fillCell(Location location,
java.awt.Color fillColor)
Fills a cell with given color. |
void |
GGBackground.fillCell(Location location,
java.awt.Color fillColor,
boolean boundary)
Fills a cell with given color. |
Location.CompassDirection |
Location.get4CompassDirectionTo(Location location)
Returns the compass direction restricted to 4 sectors from the current location the given location. |
java.util.ArrayList<Actor> |
GameGrid.getActorsAt(Location location)
Returns all actors at the given location. |
java.util.ArrayList<Actor> |
GameGrid.getActorsAt(Location location,
java.lang.Class clazz)
Returns all actors of given type in given cell. |
java.awt.Point |
GGTileMap.getCenter(Location loc)
Returns the current center of tile at given map location with respect to the playground coordinate system (origin at upper left vertex, x-coordinate to the left, y-coordinate downwards). |
java.awt.Color |
GGBackground.getColor(Location location)
Returns the color of the pixel of the background at given cell's center. |
Location.CompassDirection |
Location.getCompassDirectionTo(Location location)
Returns the compass direction restricted to 8 sectors from the current location the given location. |
java.util.ArrayList<Location> |
GameGrid.getDiagonalLocations(Location location,
boolean up)
Returns a list of all grid locations that are on the diagonal line through the given location. |
double |
Location.getDirectionTo(Location location)
Returns the direction from the current location to the given location. |
int |
Location.getDistanceTo(Location location)
Returns the distance from the current location to the given location (in cellsize units, rounded to integer). |
int |
GameGrid.getNumberOfActorsAt(Location location)
Returns number of actors at specified location. |
int |
GameGrid.getNumberOfActorsAt(Location location,
java.lang.Class clazz)
Returns number of actors of specified class at specified location. |
Actor |
GameGrid.getOneActorAt(Location location)
Returns the first actor in the actor's list at the specific location. |
Actor |
GameGrid.getOneActorAt(Location location,
java.lang.Class clazz)
Returns the first actor of specified class in the actor's list at the specific location. |
java.awt.Point |
GGTileMap.getUpperLeftVertex(Location loc)
Returns the current coordinates of the upper left vertex of tile at given map location with respect to the playground coordinate system (origin at upper left vertex, x-coordinate to the left, y-coordinate downwards). |
boolean |
GameGrid.isAtBorder(Location location)
Returns true, if the given cell location is at the grid border. |
boolean |
GameGrid.isEmpty(Location location)
Returns true, if there is no actor at specified location. |
boolean |
GameGrid.isInGrid(Location location)
Returns true, if the given cell location is within the grid. |
boolean |
GameGrid.isTileColliding(Actor a,
Location location)
Checks if the given actor and the tile at the given tile location are colliding. |
boolean |
GGTileMap.isTileCollisionEnabled(Location location)
Returns true, if collision notification with the given tiles is enabled. |
boolean |
GGMaze.isWall(Location location)
Returns true, if the cell with given cell location is a wall |
void |
Actor.nearBorder(Actor actor,
Location location)
Empty implementation of a BorderListener called when the actor is set into a border cell. |
void |
GGBorderListener.nearBorder(Actor actor,
Location location)
Event callback method called when the actor enters a border cell. |
int |
GameGrid.removeActorsAt(Location location)
Removes all actors at the specified location, so that act() is not called any more. |
int |
GameGrid.removeActorsAt(Location location,
java.lang.Class clazz)
Removes all actors from the specified class at the specified location, so that act() is not called any more. |
void |
Actor.rotate(Location centerLoc,
double angle)
Rotates the actor with given rotation center location by the given angle. |
void |
GGTileMap.setCollisionCircle(Location location,
java.awt.Point center,
int radius)
Selects the circle (in pixel units) relative to the tile center that is used for collision detection. |
void |
GGTileMap.setCollisionLine(Location location,
java.awt.Point startPoint,
java.awt.Point endPoint)
Selects the line segment (in pixel units) relative to the tile that is used for collision detection. |
void |
GGTileMap.setCollisionRectangle(Location location,
java.awt.Point center,
int width,
int height)
Selects the rectangle (in pixel units) relative to the tile that is used for collision detection. |
void |
GGTileMap.setCollisionSpot(Location location,
java.awt.Point spot)
Selects the hot spot relative to the sprite image that is used for collision detection. |
void |
GGTileMap.setImage(java.lang.String imagePath,
Location location)
Sets the tile image of the tile with given map location.In order the image fits exactly on the tile, its size in number of pixels should be tileHeight x tileWidth given when constructing the tile map. |
void |
Actor.setLocation(Location location)
Assigns the current location to the given location. |
void |
GGTileMap.setTileCollisionEnabled(Location location,
boolean enable)
Enable/disable the detection of collisions with the given tile. |
java.awt.Point |
GameGrid.toPoint(Location location)
Returns the x-y-coordinates of the center of the cell with given location (cell indices). |
Method parameters in ch.aplu.jgamegrid with type arguments of type Location | |
---|---|
void |
Actor.addCollisionTiles(java.util.ArrayList<Location> locationList)
Registers all tile locations in a list as collision candidates. |
Constructors in ch.aplu.jgamegrid with parameters of type Location | |
---|---|
Location(Location location)
Constructs a location with the coordinates of the given location. |
|
||||||||||
PREV NEXT | FRAMES NO FRAMES |