Alignement with C++
This commit is contained in:
parent
9d68f2043d
commit
a5664dea9d
@ -83,20 +83,10 @@ namespace RoboidControl {
|
|||||||
Participant.ReplaceLocalParticipant(this);
|
Participant.ReplaceLocalParticipant(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ParticipantUDP isolatedParticipant = null;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Isolated participant is used when the application is run without networking
|
|
||||||
/// </summary>
|
|
||||||
/// <returns>A participant without networking support</returns>
|
|
||||||
public static ParticipantUDP Isolated() {
|
|
||||||
if (isolatedParticipant == null)
|
|
||||||
isolatedParticipant = new ParticipantUDP(0);
|
|
||||||
return isolatedParticipant;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion Init
|
#endregion Init
|
||||||
|
|
||||||
|
#region Properties
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The name of the participant
|
/// The name of the participant
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -107,6 +97,7 @@ namespace RoboidControl {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// Isolated participants do not communicate with other participants
|
/// Isolated participants do not communicate with other participants
|
||||||
public bool isIsolated = false;
|
public bool isIsolated = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The remote site when this participant is connected to a site
|
/// The remote site when this participant is connected to a site
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -145,10 +136,9 @@ namespace RoboidControl {
|
|||||||
Console.WriteLine($"Broadcast address: {this.broadcastIpAddress}");
|
Console.WriteLine($"Broadcast address: {this.broadcastIpAddress}");
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Update
|
#endregion Properties
|
||||||
|
|
||||||
protected ulong nextPublishMe = 0;
|
#region Update
|
||||||
protected ulong nextSendUpdate = 0;
|
|
||||||
|
|
||||||
public override void Update() {
|
public override void Update() {
|
||||||
ulong currentTimeMS = Thing.GetTimeMs();
|
ulong currentTimeMS = Thing.GetTimeMs();
|
||||||
@ -169,6 +159,9 @@ namespace RoboidControl {
|
|||||||
UpdateOtherThings(currentTimeMS);
|
UpdateOtherThings(currentTimeMS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected ulong nextPublishMe = 0;
|
||||||
|
protected ulong nextSendUpdate = 0;
|
||||||
|
|
||||||
protected virtual void UpdateMyThings(ulong currentTimeMS) {
|
protected virtual void UpdateMyThings(ulong currentTimeMS) {
|
||||||
foreach (Thing thing in this.things) {
|
foreach (Thing thing in this.things) {
|
||||||
if (thing == null)
|
if (thing == null)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user