Class PressurePlateComponent

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

public class PressurePlateComponent extends Component
A pressure plate that toggles its pressed state when a player steps on it. The plate latches (stays pressed) until reset manually.
  • Constructor Details

    • PressurePlateComponent

      public PressurePlateComponent()
  • Method Details

    • 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.
      Overrides:
      create in class Component
    • setPlayerOnPlate

      public void setPlayerOnPlate(ColliderComponent collider)
    • setTextures

      public void setTextures(String unpressed, String pressed)
      Allow external configuration of textures if you add a pressed texture later