Class PropAnimationController<T extends Prop>

All Implemented Interfaces:
IEntityController, IAnimationController, IEntityAnimationController<T>, IUpdateable

public class PropAnimationController<T extends Prop> extends EntityAnimationController<T>
  • Field Details

  • Constructor Details

    • PropAnimationController

      public PropAnimationController(T prop)
      Initializes a new instance of the PropAnimationController class.
      Parameters:
      prop - The prop related to this controller.
  • Method Details

    • getSpriteName

      public static String getSpriteName(Prop prop, boolean appendState)
      Gets the sprite name for the specified prop and state.
      Parameters:
      prop - The prop to retrieve the sprite name for.
      appendState - A flag indicating whether the state should be appended to the name.
      Returns:
      A string representing the sprite name for the specified prop in its state.
      See Also:
    • getSpriteName

      public static String getSpriteName(Prop prop, PropState state, boolean appendState)
      Gets the sprite name for the specified prop and state.
      Parameters:
      prop - The prop to retrieve the sprite name for.
      state - The state of the prop.
      appendState - A flag indicating whether the state should be appended to the name.
      Returns:
      A string representing the sprite name for the specified prop in its state.
      See Also:
    • getCurrentImage

      public BufferedImage getCurrentImage()
      Description copied from interface: IAnimationController
      Gets the current sprite (keyframe) of the currently active animation of this controller.

      The implementation of this method applies all registered ImageEffects.

      Specified by:
      getCurrentImage in interface IAnimationController
      Overrides:
      getCurrentImage in class AnimationController
      Returns:
      The current sprite of the current animation with applied effects; or null, if this controller is currently disabled.
      See Also:
    • update

      public void update()
      Description copied from interface: IUpdateable
      This method is called by the game loop on all objects that are attached to the loop. It's called on every tick of the loop and the frequency can be configured using the ClientConfiguration.
      Specified by:
      update in interface IUpdateable
      Overrides:
      update in class EntityAnimationController<T extends Prop>
      See Also:
    • isAutoScaling

      public boolean isAutoScaling()
      Description copied from interface: IEntityAnimationController
      Gets a flag indicating whether this controller instance is auto scaling its animations by the dimensions of the entity.
      Specified by:
      isAutoScaling in interface IEntityAnimationController<T extends Prop>
      Overrides:
      isAutoScaling in class EntityAnimationController<T extends Prop>
      Returns:
      True if this instance is automatically scaling to the dimensions of the entity; otherwise false.