Package cl.cromer.azaraka.object
Class Gem
- java.lang.Object
-
- cl.cromer.azaraka.object.Object
-
- cl.cromer.azaraka.object.Gem
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Gem.State
The possible states of the gemstatic class
Gem.Type
The type of gem-
Nested classes/interfaces inherited from interface cl.cromer.azaraka.Constants
Constants.AIHeuristic, Constants.LogLevel, Constants.PlayerAIType
-
-
Field Summary
-
Fields inherited from interface cl.cromer.azaraka.Constants
AI_HEURISTIC, APPEND_LOGS, CELL_PIXELS, CHESTS, ENEMIES, ENEMY_AI, EXPORT_SCENE, FONT, FONT_SIZE, GENERATE_SCENE, GLOBAL_LOG, HORIZONTAL_CELLS, LOG_TO_FILE, OBSTACLES, PLAYER_AI, PRETTY_JSON, TITLE, VERTICAL_CELLS, VOLUME
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getAnimationWidth()
Get the width of the gem animationGem.State
getState()
Get the current state of the gemvoid
playGemSound()
Play the gem soundvoid
run()
This method is run when the thread startsvoid
setSound(Sound sound)
Set the gem soundvoid
setState(Gem.State state)
Set the state of the gemvoid
setType(Gem.Type type)
Set the gem type-
Methods inherited from class cl.cromer.azaraka.object.Object
changeDirection, drawAnimation, getActive, getAnimation, getCell, getLogger, getScene, getX, getY, loadCharacter, moveDown, moveLeft, moveRight, moveUp, setActive, setAnimation, setCell, setLogger, setUseOffset, setXScale, setYScale
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface cl.cromer.azaraka.Constants
getLogger, initializeLogger, random
-
-
-
-
Method Detail
-
getAnimationWidth
public int getAnimationWidth()
Get the width of the gem animation- Returns:
- Returns the gem animation width
-
setSound
public void setSound(Sound sound)
Set the gem sound- Parameters:
sound
- The gem sound
-
playGemSound
public void playGemSound()
Play the gem sound
-
setType
public void setType(Gem.Type type)
Set the gem type- Parameters:
type
- The type of gem
-
getState
public Gem.State getState()
Get the current state of the gem- Returns:
- Returns the state of the gem
-
setState
public void setState(Gem.State state)
Set the state of the gem- Parameters:
state
- The new state
-
-