From e1e781bb2135ef78592226f1a3eaba4925702f1f Mon Sep 17 00:00:00 2001 From: Fuwn Date: Mon, 3 May 2021 16:38:41 -0700 Subject: :star: --- NET/worlds/console/BBAnimateDroneCommand.java | 60 +++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 NET/worlds/console/BBAnimateDroneCommand.java (limited to 'NET/worlds/console/BBAnimateDroneCommand.java') diff --git a/NET/worlds/console/BBAnimateDroneCommand.java b/NET/worlds/console/BBAnimateDroneCommand.java new file mode 100644 index 0000000..20b95d0 --- /dev/null +++ b/NET/worlds/console/BBAnimateDroneCommand.java @@ -0,0 +1,60 @@ +/* */ package NET.worlds.console; +/* */ +/* */ import NET.worlds.scape.Drone; +/* */ import NET.worlds.scape.Pilot; +/* */ import java.io.DataInputStream; +/* */ import java.io.DataOutputStream; +/* */ import java.io.IOException; +/* */ +/* */ public class BBAnimateDroneCommand extends BlackBoxCommand +/* */ { +/* */ private String animation; +/* */ private String droneName; +/* */ +/* */ public BBAnimateDroneCommand() +/* */ { +/* 16 */ this.commandType = 9; +/* */ } +/* */ +/* */ public BBAnimateDroneCommand(String drone, String cmd) { +/* 20 */ this(); +/* 21 */ this.animation = new String(cmd); +/* 22 */ this.droneName = new String(drone); +/* */ } +/* */ +/* */ public boolean execute() +/* */ { +/* 27 */ if (this.droneName.equals("@Pilot")) { +/* 28 */ Pilot p = Pilot.getActive(); +/* 29 */ if (p != null) +/* 30 */ p.animate(this.animation); +/* */ } else { +/* 32 */ Drone d = ArmyOfZombies.instance().get(this.droneName); +/* 33 */ if (d != null) { +/* 34 */ d.animate(this.animation); +/* */ } +/* */ } +/* 37 */ doCallback(true); +/* 38 */ return true; +/* */ } +/* */ +/* */ public void save(DataOutputStream dos) throws IOException +/* */ { +/* 43 */ super.save(dos); +/* 44 */ dos.writeUTF(this.animation); +/* 45 */ dos.writeUTF(this.droneName); +/* */ } +/* */ +/* */ public void load(DataInputStream dis) throws IOException +/* */ { +/* 50 */ super.load(dis); +/* 51 */ this.animation = new String(dis.readUTF()); +/* 52 */ this.droneName = new String(dis.readUTF()); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\console\BBAnimateDroneCommand.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file -- cgit v1.2.3