Class BlinkComponent

java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.rendering.BlinkComponent
All Implemented Interfaces:
com.badlogic.gdx.utils.Json.Serializable

public class BlinkComponent extends Component
  • Constructor Details

    • BlinkComponent

      public BlinkComponent()
  • Method Details

    • create

      public void create()
      Initializes the BlinkComponent and adds an event listener for handling "hit" events.
      Overrides:
      create in class Component
    • getColor

      public com.badlogic.gdx.graphics.Color getColor()
      Gets the color used for rendering the entity during the blink effect.
      Returns:
      The Color object representing the entity's color.
    • isBlinking

      public boolean isBlinking()
      Checks whether the entity is currently blinking.
      Returns:
      true if the entity is blinking; false otherwise.
    • update

      public void update()
      Updates the entity's blinking effect over time, interpolating color opacity.
      Overrides:
      update in class Component