|
@@ -392,6 +392,27 @@ public class BasicCommands { |
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* This command creates a notification box next to the portrait for the player 2 which contains
|
|
|
|
|
|
* the specified text. It will be displayed for a number of seconds before being removed.
|
|
|
|
|
|
* object.
|
|
|
|
|
|
* @param out
|
|
|
|
|
|
* @param text
|
|
|
|
|
|
* @param displayTimeSeconds
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static void addPlayer2Notification(ActorRef out, String text, int displayTimeSeconds) {
|
|
|
|
|
|
try {
|
|
|
|
|
|
ObjectNode returnMessage = Json.newObject();
|
|
|
|
|
|
returnMessage.put("messagetype", "addPlayer2Notification");
|
|
|
|
|
|
returnMessage.put("text", text);
|
|
|
|
|
|
returnMessage.put("seconds", displayTimeSeconds);
|
|
|
|
|
|
if (altTell!=null) altTell.tell(returnMessage);
|
|
|
|
|
|
else out.tell(returnMessage, out);
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
/**
|
|
|
* Plays a projectile fire animation between two tiles
|
|
|
* Plays a projectile fire animation between two tiles
|
|
|
* @param out
|
|
|
* @param out
|
|
|