diff options
| author | Fuwn <[email protected]> | 2021-05-03 16:38:41 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-05-03 16:38:41 -0700 |
| commit | e1e781bb2135ef78592226f1a3eaba4925702f1f (patch) | |
| tree | 8a5b590463ed413e1c6eabb719130e701b95ca63 /NET/worlds/console/BBAnimateDroneCommand.java | |
| download | worlds.jar-main.tar.xz worlds.jar-main.zip | |
Diffstat (limited to 'NET/worlds/console/BBAnimateDroneCommand.java')
| -rw-r--r-- | NET/worlds/console/BBAnimateDroneCommand.java | 60 |
1 files changed, 60 insertions, 0 deletions
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 |