Class SoundSourceFactory

java.lang.Object
games.stendhal.server.entity.mapstuff.sound.SoundSourceFactory
All Implemented Interfaces:
ConfigurableFactory
Direct Known Subclasses:
BackgroundMusicSourceFactory, LoopedAmbientSoundSourceFactory, PeriodicAmbientSoundSourceFactory, PlaySoundEntityFactory

public abstract class SoundSourceFactory extends Object implements ConfigurableFactory
A factory for SoundSources.
  • Constructor Details

    • SoundSourceFactory

      public SoundSourceFactory()
  • Method Details

    • getSound

      protected String getSound(ConfigurableFactoryContext ctx)
      gets the sound name
      Parameters:
      ctx - ConfigurableFactoryContext
      Returns:
      name of sound
    • getRadius

      protected int getRadius(ConfigurableFactoryContext ctx)
      gets the radius, default to a value large enough to cover the complete zone
      Parameters:
      ctx - ConfigurableFactoryContext
      Returns:
      radius
    • getVolume

      protected int getVolume(ConfigurableFactoryContext ctx)
      gets the volume, defaulting to 100%
      Parameters:
      ctx - ConfigurableFactoryContext
      Returns:
      volume