diff --git a/src/Participants/ParticipantUDP.cs b/src/Participants/ParticipantUDP.cs index 4e3de23..d6e27c2 100644 --- a/src/Participants/ParticipantUDP.cs +++ b/src/Participants/ParticipantUDP.cs @@ -83,20 +83,10 @@ namespace RoboidControl { Participant.ReplaceLocalParticipant(this); } - private static ParticipantUDP isolatedParticipant = null; - - /// - /// Isolated participant is used when the application is run without networking - /// - /// A participant without networking support - public static ParticipantUDP Isolated() { - if (isolatedParticipant == null) - isolatedParticipant = new ParticipantUDP(0); - return isolatedParticipant; - } - #endregion Init + #region Properties + /// /// The name of the participant /// @@ -107,6 +97,7 @@ namespace RoboidControl { /// /// Isolated participants do not communicate with other participants public bool isIsolated = false; + /// /// The remote site when this participant is connected to a site /// @@ -145,10 +136,9 @@ namespace RoboidControl { Console.WriteLine($"Broadcast address: {this.broadcastIpAddress}"); } - #region Update + #endregion Properties - protected ulong nextPublishMe = 0; - protected ulong nextSendUpdate = 0; + #region Update public override void Update() { ulong currentTimeMS = Thing.GetTimeMs(); @@ -169,6 +159,9 @@ namespace RoboidControl { UpdateOtherThings(currentTimeMS); } + protected ulong nextPublishMe = 0; + protected ulong nextSendUpdate = 0; + protected virtual void UpdateMyThings(ulong currentTimeMS) { foreach (Thing thing in this.things) { if (thing == null)