Class SoundFxUpdate

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    public class SoundFxUpdate
    extends java.lang.Object
    implements java.io.Serializable, java.lang.Cloneable
    Update information for clients in network game.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.LinkedList<SoundInfo> clips
      Array of lists of SoundInfo objects.
      protected java.util.LinkedList<java.lang.Integer> stoppedClips
      Array of lists of SoundInfo objects.
    • Constructor Summary

      Constructors 
      Constructor Description
      SoundFxUpdate()
      Creates new SoundFxUpdate with empty lists of SoundInfos.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addSoundInfo​(java.lang.String name)
      Adds a SoundInfo for the given mode for client update or replayer.
      void addSoundInfo​(java.lang.String name, int id, boolean looped)
      Adds a SoundInfo for the given mode for client update or replayer.
      void addSoundStopID​(int id)
      Adds an id of a stopped sound.
      void clear()
      Clears the update lists.
      java.lang.Object clone()
      Clones the update lists.
      java.util.List<SoundInfo> getClips()
      Gets the current SoundInfos for the mode.
      java.util.List<java.lang.Integer> getStoppedClips()
      Gets a list of (looped) SoundInfo objects that should be stopped.
      java.lang.String toString()
      Returns a string representation.
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • clips

        protected java.util.LinkedList<SoundInfo> clips
        Array of lists of SoundInfo objects.
      • stoppedClips

        protected java.util.LinkedList<java.lang.Integer> stoppedClips
        Array of lists of SoundInfo objects.
    • Constructor Detail

      • SoundFxUpdate

        public SoundFxUpdate()
        Creates new SoundFxUpdate with empty lists of SoundInfos.
    • Method Detail

      • getStoppedClips

        public java.util.List<java.lang.Integer> getStoppedClips()
        Gets a list of (looped) SoundInfo objects that should be stopped.
        Returns:
        The list of SoundInfos for clips to stop.
      • addSoundInfo

        public void addSoundInfo​(java.lang.String name,
                                 int id,
                                 boolean looped)
        Adds a SoundInfo for the given mode for client update or replayer.
        Parameters:
        name - The clipname.
        id - The clip id.
        looped - Flag, if clip is looped.
      • addSoundInfo

        public void addSoundInfo​(java.lang.String name)
        Adds a SoundInfo for the given mode for client update or replayer.
        Parameters:
        name - The clipname.
      • addSoundStopID

        public void addSoundStopID​(int id)
        Adds an id of a stopped sound.
        Parameters:
        id - The id.
      • getClips

        public java.util.List<SoundInfo> getClips()
        Gets the current SoundInfos for the mode.
        Returns:
        The list of SoundInfos
      • toString

        public java.lang.String toString()
        Returns a string representation.
        Overrides:
        toString in class java.lang.Object
        Returns:
        The sound infos
      • clear

        public void clear()
        Clears the update lists.
      • clone

        public java.lang.Object clone()
        Clones the update lists.
        Overrides:
        clone in class java.lang.Object