Class BoxPressurePlateComponent

java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.BoxPressurePlateComponent

public class BoxPressurePlateComponent extends Component
Pressure plate that ONLY responds to weighted boxes. Emits "plateToggled" (Boolean) when pressed/unpressed.
  • Constructor Details

    • BoxPressurePlateComponent

      public BoxPressurePlateComponent()
  • Method Details

    • create

      public void create()
      Called when component is created, intialises texture rendering
      Overrides:
      create in class Component
    • setEntityOnPlate

      public void setEntityOnPlate(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 trigger
      Parameters:
      other -
      onPlate -
    • resetPlate

      public void resetPlate()