Crossfire JXClient, Trunk
Public Member Functions | Private Attributes | List of all members
com.realtime.crossfire.jxclient.sound.SoundWatcher Class Reference
Collaboration diagram for com.realtime.crossfire.jxclient.sound.SoundWatcher:
Collaboration graph

Public Member Functions

 SoundWatcher (@NotNull final CrossfireServerConnection crossfireServerConnection, @NotNull final SoundManager soundManager)
 

Private Attributes

final CrossfireSoundListener crossfireSoundListener
 
final SoundManager soundManager
 

Detailed Description

Monitors sound and sound2 commands received from the server to generate sound effects.

Author
Andreas Kirschbaum

Definition at line 34 of file SoundWatcher.java.

Constructor & Destructor Documentation

◆ SoundWatcher()

com.realtime.crossfire.jxclient.sound.SoundWatcher.SoundWatcher ( @NotNull final CrossfireServerConnection  crossfireServerConnection,
@NotNull final SoundManager  soundManager 
)

Creates a new instance.

Parameters
crossfireServerConnectionthe connection to watch
soundManagerthe sound manager instance to watch

Definition at line 66 of file SoundWatcher.java.

References com.realtime.crossfire.jxclient.sound.SoundWatcher.crossfireSoundListener, and com.realtime.crossfire.jxclient.sound.SoundWatcher.soundManager.

Member Data Documentation

◆ crossfireSoundListener

final CrossfireSoundListener com.realtime.crossfire.jxclient.sound.SoundWatcher.crossfireSoundListener
private
Initial value:
= new CrossfireSoundListener() {
@Override
public void commandSoundReceived(final int x, final int y, final int num, final int type) {
}
@Override
public void commandSound2Received(final int x, final int y, final int dir, final int volume, final int type, @NotNull final String action, @NotNull final String name) {
soundManager.playClip(Sounds.CHARACTER, action);
}
}

The crossfire sound listener.

Definition at line 47 of file SoundWatcher.java.

Referenced by com.realtime.crossfire.jxclient.sound.SoundWatcher.SoundWatcher().

◆ soundManager

final SoundManager com.realtime.crossfire.jxclient.sound.SoundWatcher.soundManager
private

The SoundManager instance to watch.

Definition at line 40 of file SoundWatcher.java.

Referenced by com.realtime.crossfire.jxclient.sound.SoundWatcher.SoundWatcher().


The documentation for this class was generated from the following file:
com.realtime.crossfire.jxclient.sound.SoundManager.playClip
void playClip(@NotNull final Sounds type, @NotNull final CharSequence action)
Definition: SoundManager.java:183
com.realtime.crossfire.jxclient.sound.SoundWatcher.soundManager
final SoundManager soundManager
Definition: SoundWatcher.java:40