Class LockingMethod
java.lang.Object
group24.escaperoom.entities.properties.LockingMethod
- All Implemented Interfaces:
com.badlogic.gdx.utils.Json.Serializable,ItemPropertyValue
- Direct Known Subclasses:
CombinationLock,KeyLock,PassphraseLock,PowerLock,TrivialLock
public abstract class LockingMethod
extends Object
implements com.badlogic.gdx.utils.Json.Serializable, ItemPropertyValue
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected LockingMethodbooleanabstract com.badlogic.gdx.utils.Array<PlayerAction>getDisplay(Menu parent) protected abstract LockingMethodgetLockAction(GameContext ctx) Get a player action that would lock this locking method This can be null if the action is not valid, or if there is no such action for this lockabstract StringgetName()abstract LockingMethodTypegetType()Get a player action that would unlock this locking method This can be null if the action is not valid, or if there is no such action for this lockbooleanisLocked()protected abstract PlayerActionprotected abstract PlayerActionvoidvoidvoidread(com.badlogic.gdx.utils.Json json, com.badlogic.gdx.utils.JsonValue jsonData) voidwrite(com.badlogic.gdx.utils.Json json)
-
Field Details
-
isBarrier
protected boolean isBarrier -
owner
-
isLocked
protected boolean isLocked
-
-
Constructor Details
-
LockingMethod
public LockingMethod()
-
-
Method Details
-
getName
-
isLocked
public boolean isLocked() -
getActions
-
getUnlockAction
Get a player action that would unlock this locking method This can be null if the action is not valid, or if there is no such action for this lock -
getLockAction
Get a player action that would lock this locking method This can be null if the action is not valid, or if there is no such action for this lock -
maybeGetLockAction
-
maybeGetUnlockAction
-
getType
-
onAttach
-
onDetatch
public void onDetatch() -
getDisplay
- Specified by:
getDisplayin interfaceItemPropertyValue- Parameters:
parent- the menu spawning this entry- Returns:
- the
Menu.MenuEntrydescribing thisItemPropertyValue
-
write
public void write(com.badlogic.gdx.utils.Json json) - Specified by:
writein interfacecom.badlogic.gdx.utils.Json.Serializable
-
read
public void read(com.badlogic.gdx.utils.Json json, com.badlogic.gdx.utils.JsonValue jsonData) - Specified by:
readin interfacecom.badlogic.gdx.utils.Json.Serializable
-
equals
-
getEmptyMethod
-
clone
-