@Override
public void setClientState(CellComponentClientState clientState) {
super.setClientState(clientState);
PortalComponentClientState state = (PortalComponentClientState) clientState;
serverURL = state.getServerURL();
location = state.getLocation();
look = state.getLook();
audioSource = state.getAudioSource();
if (audioSource == null || audioSource.length() == 0) {
audioSource = PortalComponentProperties.getDefaultAudioSource();
}
uploadFile = state.getUploadFile();
volume = state.getVolume();
if (audioSource != null) {
try {
teleportAudioURL =
PortalComponent.class.getResource(audioSource);
//URL url = PortalComponent.class.getResource(audioSource);
//teleportAudio = new AudioResource(url);
//teleportAudio.setVolume(volume);
} catch (Exception e) {
System.out.println("Invalid URL: " + audioSource
+ ": " + e.getMessage());
}
}
backgroundColor = state.getBackgroundColor();
textColor = state.getTextColor();
imageURL = state.getImageURL();
message = state.getMessage();
}