diff --git a/examples/DisShooting/src/DisShooting/NetworkComms.java b/examples/DisShooting/src/DisShooting/NetworkComms.java index c72ecbca7a9ddd6b54c0a1faa9f72cce719b2328..ddc743154d9cfcb657f099975b0b4e877556366b 100644 --- a/examples/DisShooting/src/DisShooting/NetworkComms.java +++ b/examples/DisShooting/src/DisShooting/NetworkComms.java @@ -32,6 +32,8 @@ public class NetworkComms implements Runnable /** people we notify when we receive a PDU */ private List<PduListener> listeners; + /** provide reference to this object + * @return reference to this object */ public static NetworkComms getInstance() { synchronized(NetworkComms.class) @@ -110,7 +112,8 @@ public class NetworkComms implements Runnable socket.close(); } } - + /** Send a PDU + * @param aPdu to send */ public void sendPdu(Pdu aPdu) { aPdu.setTimestamp(time.getDisAbsoluteTimestamp()); @@ -125,11 +128,15 @@ public class NetworkComms implements Runnable } } + /** add a PduListener, if not already present + * @param aListener PduListener reference to add */ public void addListener(PduListener aListener) { listeners.add(aListener); } + /** remove a PduListener, if present + * @param aListener PduListener reference to remove */ public void removeListener(PduListener aListener) { listeners.remove(aListener); diff --git a/examples/DisShooting/src/DisShooting/SimulationRunner.java b/examples/DisShooting/src/DisShooting/SimulationRunner.java index 71f18b8e87e79abc668ce4e5e91334b576abdc97..fc661af4b27cac38b7119229e2c59a4f60a35ee0 100644 --- a/examples/DisShooting/src/DisShooting/SimulationRunner.java +++ b/examples/DisShooting/src/DisShooting/SimulationRunner.java @@ -16,6 +16,7 @@ import edu.nps.moves.dis7.pdus.*; */ public class SimulationRunner { + /** three strikes you're out! */ public final static int FIRING_ATTEMPTS = 3; private static NetworkComms networkComms = null; @@ -226,7 +227,8 @@ public class SimulationRunner PduListenerImpl.ENTITIES.clear(); } } - + /** wait before next activity + * @param ms duration in milliseconds */ public static void sleep(long ms) { try { diff --git a/examples/DisShooting/src/DisShooting/Sniper.java b/examples/DisShooting/src/DisShooting/Sniper.java index fb8de97589c00778d0d0fd5304662341417df564..18b447e09d62c673f12447c0048a711fc1acad84 100644 --- a/examples/DisShooting/src/DisShooting/Sniper.java +++ b/examples/DisShooting/src/DisShooting/Sniper.java @@ -17,6 +17,8 @@ public class Sniper implements Runnable Vector3Double disCoordinates; EntityID eId; + /** provide reference to this object + * @return reference to this object */ public static Sniper getInstance() { if (sniper == null) { sniper = new Sniper(); diff --git a/examples/DisShooting/src/DisShooting/Target.java b/examples/DisShooting/src/DisShooting/Target.java index 5b73a0f395cb33bb0cb7fc24126cc336e27074ac..68d5c22811d6ae96ed27ecbd361f6147454d8bea 100644 --- a/examples/DisShooting/src/DisShooting/Target.java +++ b/examples/DisShooting/src/DisShooting/Target.java @@ -19,6 +19,8 @@ public class Target implements Runnable { private static Target target = null; private EntityID eId; + /** provide reference to this object + * @return reference to this object */ public static Target getInstance() { if (target == null) { target = new Target();