Package cl.cromer.azaraka.object
Class Portal
- java.lang.Object
-
- cl.cromer.azaraka.object.Object
-
- cl.cromer.azaraka.object.Portal
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Portal.State
The current state of the portal-
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 Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deleteInstance()
Delete the Portal instancestatic Portal
getInstance(Scene scene, Cell cell)
Create an instance of the portalPortal.State
getState()
Get the current state of the portalvoid
purifyGems()
Purify the gems the player is carryingvoid
run()
This method is run when the thread startsvoid
setSound(Sound sound)
Set the portal soundvoid
setState(Portal.State state)
Sets a new status for the portal-
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
-
getInstance
public static Portal getInstance(Scene scene, Cell cell)
Create an instance of the portal- Parameters:
scene
- The scene the portal is incell
- The cell the portal is in- Returns:
- Returns the Portal instance
-
deleteInstance
public void deleteInstance()
Delete the Portal instance
-
purifyGems
public void purifyGems()
Purify the gems the player is carrying
-
setSound
public void setSound(Sound sound)
Set the portal sound- Parameters:
sound
- The portal sound
-
getState
public Portal.State getState()
Get the current state of the portal- Returns:
- Returns the state of the portal
-
setState
public void setState(Portal.State state)
Sets a new status for the portal- Parameters:
state
- The new status
-
-