Class ShootEffect

java.lang.Object
com.github.tommyettinger.textra.Effect
com.github.tommyettinger.textra.effects.ShootEffect

public class ShootEffect extends Effect
Moves an underline or strikethrough line through part of the affected text repeatedly.
Parameters: underline;strikethrough;distance;frequency
The underline should be true if an underline should be drawn; defaults to true. The strikethrough should be true if a strikethrough line should be drawn; defaults to false. The distance affects how long the line(s) should be; it should be between 0 and 1, and defaults to 0.3 . The frequency affects how fast the effect should move, and may be negative to reverse the direction; defaults to 1.0 .
Example usage: {SHOOT=f;t;0.4;2}This text will draw a longer line than usual as strikethrough only, and will move more quickly.{ENDSHOOT} {SHOOT=t;f;0.1;0.5}This text will draw a shorter line as underline only, and will move more slowly.{ENDSHOOT}
  • Constructor Details

  • Method Details

    • onApply

      protected void onApply(long glyph, int localIndex, int globalIndex, float delta)
      Description copied from class: Effect
      Called when this effect should be applied to the given glyph.
      Specified by:
      onApply in class Effect