22 package com.realtime.crossfire.jxclient.animations;
27 import java.util.HashMap;
29 import org.jetbrains.annotations.NotNull;
30 import org.jetbrains.annotations.Nullable;
43 private final Map<Integer, Animation>
animations =
new HashMap<>();
50 @SuppressWarnings(
"FieldCanBeLocal")
59 public void metaserver() {
64 public void preConnecting(@NotNull
final String serverInfo) {
69 public void connecting(@NotNull
final String serverInfo) {
79 public void connected() {
84 public void connectFailed(@NotNull
final String reason) {
96 if (guiStateManager != null) {
107 public void addAnimation(
final int animationId,
final int flags, @NotNull
final int[] faces) {
108 if (faces.length == 1) {
109 System.err.println(
"Warning: animation id "+animationId+
" has only one face");
113 if (animations.put(animationId, animation) != null) {
114 System.err.println(
"Warning: duplicate animation id "+animationId);
126 return animations.get(animationId);
Interface for listeners interested gui state changes.
Maintains the current GuiState.
void addAnimation(final int animationId, final int flags, @NotNull final int[] faces)
Defines a new animation.
final GuiStateListener guiStateListener
The GuiStateListener for detecting established or dropped connections.
final Map< Integer, Animation > animations
All defined animations.
Animations(@Nullable final GuiStateManager guiStateManager)
Creates a new instance.
Manages animations received from the server.
Connection progress states of the Crossfire server connection.
Manages animations received from the server.