示例#1
0
 /// <summary>
 /// Records an acked status from the peer for a given entity ID.
 /// </summary>
 public void RecordUpdate(EntityId entityId, ViewEntry entry)
 {
     if (!LatestUpdates.TryGetValue(entityId, out var currentEntry) || currentEntry.Tick <= entry.Tick)
     {
         LatestUpdates[entityId] = entry;
     }
 }
示例#2
0
 /// <summary>
 /// Returns the latest tick the peer has acked for this entity ID.
 /// </summary>
 public ViewEntry GetLatest(EntityId id)
 {
     return(LatestUpdates.TryGetValue(id, out var result) ? result : ViewEntry.INVALID);
 }