/* */ 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 */