Package com.csse3200.game.components
Class BoxPressurePlateComponent
java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.BoxPressurePlateComponent
Pressure plate that ONLY responds to weighted boxes.
Emits "plateToggled" (Boolean) when pressed/unpressed.
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreate()Called when component is created, intialises texture renderingvoidvoidsetEntityOnPlate(Entity other, boolean onPlate) Update's the plate's state when entity moves on or off the plate Only valid entities (weighted boxes or player) can triggerMethods inherited from class com.csse3200.game.components.Component
dispose, earlyUpdate, getEntity, getPrio, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, update
-
Constructor Details
-
BoxPressurePlateComponent
public BoxPressurePlateComponent()
-
-
Method Details
-
create
public void create()Called when component is created, intialises texture rendering -
setEntityOnPlate
Update's the plate's state when entity moves on or off the plate Only valid entities (weighted boxes or player) can trigger- Parameters:
other-onPlate-
-
resetPlate
public void resetPlate()
-