public class Clue
extends com.badlogic.gdx.graphics.g2d.Sprite
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
description
The description of the clue, set when you initialise the clue and gettable using
getDescription() |
private java.lang.String |
name
The name of the clue, set when you initialise the clue and gettable using
getName() |
private Vector2Int |
tileCoordinates
This is the location on the map in terms of tiles can be set using
setTileCoordinates(int, int)
Note: this is different to com.badlogic.gdx.graphics.g2d.Sprite.position that is the position on the screen in terms of pixels,
whereas this is in terms of map tiles relative to the bottom left of the map. |
Constructor and Description |
---|
Clue(java.lang.String name,
java.lang.String description,
com.badlogic.gdx.graphics.g2d.TextureRegion texture)
Creates a clue
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
This method checks equality of this Clue object and another object.
|
java.lang.String |
getDescription()
Getter for clue description
|
java.lang.String |
getName()
Getter for Clue name.
|
Vector2Int |
getPosition()
This method gets the Clue's current tile location on the map as a Vector2Int
|
int |
getTileX()
This method returns the x component of the clues tile coordinates from
getPosition() |
int |
getTileY()
This method returns the y component of the clues tile coordinates from
getPosition() |
Clue |
setTileCoordinates(int x,
int y)
Setter for clue tile coordinates.
|
Clue |
setTileCoordinates(Vector2Int v)
This method calls the method of the same name but allows a Vector2Int as a parameter rather than
the specific coordinates.
|
draw, draw, flip, getBoundingRectangle, getColor, getHeight, getOriginX, getOriginY, getRotation, getScaleX, getScaleY, getVertices, getWidth, getX, getY, rotate, rotate90, scale, scroll, set, setAlpha, setBounds, setCenter, setCenterX, setCenterY, setColor, setColor, setColor, setFlip, setOrigin, setOriginCenter, setPosition, setRegion, setRotation, setScale, setScale, setSize, setU, setU2, setV, setV2, setX, setY, translate, translateX, translateY
getRegionHeight, getRegionWidth, getRegionX, getRegionY, getTexture, getU, getU2, getV, getV2, isFlipX, isFlipY, setRegion, setRegion, setRegion, setRegion, setRegionHeight, setRegionWidth, setRegionX, setRegionY, setTexture, split, split
private java.lang.String name
getName()
private java.lang.String description
getDescription()
private Vector2Int tileCoordinates
setTileCoordinates(int, int)
Note: this is different to com.badlogic.gdx.graphics.g2d.Sprite.position that is the position on the screen in terms of pixels,
whereas this is in terms of map tiles relative to the bottom left of the map.public Clue(java.lang.String name, java.lang.String description, com.badlogic.gdx.graphics.g2d.TextureRegion texture)
name
- the name of the clue i.e. what it isdescription
- describes what the clue istexture
- the texture region of the cluepublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- - The clue object.public java.lang.String getName()
public java.lang.String getDescription()
public Clue setTileCoordinates(Vector2Int v)
It sets the tile coordinates of the clue in the map.
v
- - The Vector2Int that the clue's tile coordinates are to be set topublic Clue setTileCoordinates(int x, int y)
x
- - The x coordinate for where the clue is, in terms of tiles.y
- - The y coordinate for where the clue is, in terms of tiles.
all coordinates relative to bottom left of the map
public Vector2Int getPosition()
public int getTileX()
getPosition()
public int getTileY()
getPosition()