Class SoundEffect

java.lang.Object
de.gurkenlabs.litiengine.abilities.effects.Effect
de.gurkenlabs.litiengine.abilities.effects.SoundEffect
All Implemented Interfaces:
IUpdateable

public class SoundEffect extends Effect
  • Constructor Details

    • SoundEffect

      public SoundEffect(ICombatEntity executingEntity, Sound... sounds)
      Initializes a new instance of the SoundEffect class.
      Parameters:
      sounds - The sounds to chose from when applying the effect.
    • SoundEffect

      public SoundEffect(Sound... sounds)
      Initializes a new instance of the SoundEffect class with the specified sounds.
      Parameters:
      sounds - The sounds to choose from when applying the effect.
    • SoundEffect

      public SoundEffect(ICombatEntity executingEntity, String... sounds)
      Initializes a new instance of the SoundEffect class with the specified executing entity and sounds.
      Parameters:
      executingEntity - The entity executing the effect.
      sounds - The names of the sounds to choose from when applying the effect.
    • SoundEffect

      public SoundEffect(String... sounds)
      Initializes a new instance of the SoundEffect class with the specified sounds.
      Parameters:
      sounds - The names of the sounds to choose from when applying the effect.
  • Method Details

    • apply

      protected void apply(ICombatEntity entity)
      Applies the sound effect to the specified entity, playing a random sound from the list of sounds.
      Overrides:
      apply in class Effect
      Parameters:
      entity - The entity to which the effect is applied.