void ListGreedles()
 {
     calledList++;
     greedles.Clear();
     IGC.SendBroadcastMessage("greedle_directive", JSON.Stringify(GreedleDirective.ToJSON(new GreedleDirective()
     {
         type = GreedleDirective.DirectiveType.Respond
     })));
     DrawOutput();
 }
            public Ship init()
            {
                Ship ship = new Ship();

                ship.id     = pb.EntityId;
                ship.type   = "0";
                ship.action = "NULL";
                igc.SendBroadcastMessage <String>(listenerId, ship.encode());
                if (unicastListener.HasPendingMessage)
                {
                    MyIGCMessage message = unicastListener.AcceptMessage();
                    Ship         s       = new Ship();
                    s.decode(message.Data.ToString());
                    return(s);
                }

                return(null);
            }
Beispiel #3
0
 public static void SendBroadcast <TData>(this IMyIntergridCommunicationSystem igc, Command <TData> cmd)
 {
     igc.SendBroadcastMessage(cmd.Tag, cmd.Serialize());
 }
 public void SendPing()
 {
     IGC.SendBroadcastMessage("ping", false);
 }
Beispiel #5
0
 private void TransmitMessage(String destination, String message)
 {
     IGC.SendBroadcastMessage(destination, message, TransmissionDistance.TransmissionDistanceMax);
     //L.Debug("Transmiting: " + message);
 }