Package com.csse3200.game.components
Class KeycardGateComponent
java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.KeycardGateComponent
A gate that requires a specific keycard level to pass through.
The gate will remain locked until the player collides with it AND
has the required keycard level in their InventoryComponent.
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
create()
Called when the entity is created and registered.static boolean
boolean
static void
setGlobalOverride
(boolean enabled) Enable/disable the global keycard-gate override.void
unlock()
Methods inherited from class com.csse3200.game.components.Component
dispose, earlyUpdate, getEntity, getPrio, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, update
-
Constructor Details
-
KeycardGateComponent
-
-
Method Details
-
setGlobalOverride
public static void setGlobalOverride(boolean enabled) Enable/disable the global keycard-gate override. -
isGlobalOverride
public static boolean isGlobalOverride()- Returns:
- true if the global override is enabled.
-
create
public void create()Description copied from class:Component
Called when the entity is created and registered. Initial logic such as calls to GetComponent should be made here, not in the constructor which is called before an entity is finished. -
unlock
public void unlock() -
isUnlocked
public boolean isUnlocked()
-