Class BreakablePlatformComponent

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

public class BreakablePlatformComponent extends Component
Component for a breakable platform that shakes, fades, and disappears after a player steps on it. The platform listens for collision events to detect when a player lands on it. Once triggered, it will wait for a configurable delay before starting a shaking animation, then disables the platform's physics body and smoothly fades out its texture before removal. All timing and effect parameters are configurable via constructor or can be customized by subclassing.
  • Constructor Details

    • BreakablePlatformComponent

      public BreakablePlatformComponent()
  • 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