Class Cursor
- java.lang.Object
-
- com.badlogic.gdx.graphics.g3d.Renderable
-
- com.bombinggames.wurfelengine.core.gameobjects.AbstractGameObject
-
- com.bombinggames.wurfelengine.core.gameobjects.AbstractEntity
-
- com.bombinggames.wurfelengine.core.gameobjects.Cursor
-
public class Cursor extends AbstractEntity
The seletion indicator in the level editor.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.bombinggames.wurfelengine.core.gameobjects.AbstractEntity
colissionRadius
-
Fields inherited from class com.bombinggames.wurfelengine.core.gameobjects.AbstractGameObject
sprite
-
-
Constructor Summary
Constructors Constructor Description Cursor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Coordinate
getCoordInNormalDirection()
if at ground does not move upSimpleEntity
getNormal()
The normal object.Side
getNormalSide()
boolean
handleMessage(com.badlogic.gdx.ai.msg.Telegram msg)
void
setHidden(boolean hidden)
Hides an object.void
setInfo(CursorInfo selDet)
void
setNormal(Side side)
void
setPosition(Point pos)
keeps the referencevoid
setPosition(Position pos)
Set the coordinates without safety check.void
setTool(Tool tool)
tool which is representedAbstractEntity
spawn(Point point)
Add this entity to the map-> let it spawnvoid
update(float dt)
Updates the logic of the object.void
update(GameView view, int screenX, int screenY)
Updates the selection using the screen position of the cursor.-
Methods inherited from class com.bombinggames.wurfelengine.core.gameobjects.AbstractEntity
addComponent, collidesWith, dispose, getCollidingEntities, getCollidingEntities, getComponents, getComponents, getCoord, getCoveredBlocks, getDimensionZ, getHealth, getLightlevelB, getLightlevelG, getLightlevelR, getMass, getName, getPoint, getPosition, getRegisteredEntities, getSpriteCategory, getSpriteId, getSpriteValue, hasPosition, heal, isIndestructible, isInMemoryArea, isMarkedDS, isOnGround, isSavedPersistent, markAsVisitedDS, registerEngineEntities, registerEntity, removeComponent, removeFromMap, requestChunk, setDamageSounds, setDimensionZ, setHealth, setIndestructible, setLightlevel, setMass, setName, setSavePersistent, setSpriteCategory, setSpriteId, setSpriteValue, setUseRawDelta, shouldBeDisposed, takeDamage, useRawDelta
-
Methods inherited from class com.bombinggames.wurfelengine.core.gameobjects.AbstractGameObject
getColor, getDepth, getPixmap, getRotation, getScaling, getSprite, getSprite, getSpritesheet, getSpritesheetPath, getTextureDiffuse, getTextureNormal, isHidden, loadSheet, render, render, setColor, setCustomSpritesheet, setRotation, setScaling, shouldBeRendered, staticDispose, updateSpriteCache
-
-
-
-
Method Detail
-
update
public void update(float dt)
Description copied from class:AbstractEntity
Updates the logic of the object.- Overrides:
update
in classAbstractEntity
- Parameters:
dt
- time since last update in game time
-
setInfo
public void setInfo(CursorInfo selDet)
- Parameters:
selDet
-
-
spawn
public AbstractEntity spawn(Point point)
Description copied from class:AbstractEntity
Add this entity to the map-> let it spawn- Overrides:
spawn
in classAbstractEntity
- Parameters:
point
- the point in the game world where the object is. If it was previously set this is ignored.- Returns:
- returns itself
-
setPosition
public void setPosition(Position pos)
Description copied from class:AbstractGameObject
Set the coordinates without safety check. May use different object pointing to the same position.- Overrides:
setPosition
in classAbstractEntity
- Parameters:
pos
- the coordinates you want to set
-
setPosition
public void setPosition(Point pos)
Description copied from class:AbstractEntity
keeps the reference- Overrides:
setPosition
in classAbstractEntity
-
setNormal
public void setNormal(Side side)
- Parameters:
side
-
-
getNormalSide
public Side getNormalSide()
- Returns:
-
getCoordInNormalDirection
public Coordinate getCoordInNormalDirection()
if at ground does not move up- Returns:
- the neighbour coordinate where the normal points to. cpy safe
-
getNormal
public SimpleEntity getNormal()
The normal object. Position- Returns:
-
update
public void update(GameView view, int screenX, int screenY)
Updates the selection using the screen position of the cursor.- Parameters:
view
-screenX
- cursor position from leftscreenY
- cursor position from top
-
setHidden
public void setHidden(boolean hidden)
Description copied from class:AbstractGameObject
Hides an object. It won't be rendered but still affects physics.- Overrides:
setHidden
in classAbstractGameObject
-
handleMessage
public boolean handleMessage(com.badlogic.gdx.ai.msg.Telegram msg)
-
setTool
public void setTool(Tool tool)
tool which is represented- Parameters:
tool
-
-
-