mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
syntax
This commit is contained in:
parent
f161fa8f43
commit
b5b3d33704
@ -115,22 +115,6 @@ public void SetDirtyBit(ulong dirtyBit)
|
||||
syncVarDirtyBits |= dirtyBit;
|
||||
}
|
||||
|
||||
/// <summary>Clears all the dirty bits that were set by SetDirtyBits()</summary>
|
||||
// automatically invoked when an update is sent for this object, but can
|
||||
// be called manually as well.
|
||||
public void ClearAllDirtyBits()
|
||||
{
|
||||
lastSyncTime = NetworkTime.localTime;
|
||||
syncVarDirtyBits = 0L;
|
||||
|
||||
// flush all unsynchronized changes in syncobjects
|
||||
// (Linq allocates, use for instead)
|
||||
for (int i = 0; i < syncObjects.Count; ++i)
|
||||
{
|
||||
syncObjects[i].Flush();
|
||||
}
|
||||
}
|
||||
|
||||
// creates a 64 bit dirty mask for Sync Collections (aka SyncObjects)
|
||||
internal ulong DirtyObjectBits()
|
||||
{
|
||||
@ -170,6 +154,22 @@ public bool IsDirty()
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>Clears all the dirty bits that were set by SetDirtyBits()</summary>
|
||||
// automatically invoked when an update is sent for this object, but can
|
||||
// be called manually as well.
|
||||
public void ClearAllDirtyBits()
|
||||
{
|
||||
lastSyncTime = NetworkTime.localTime;
|
||||
syncVarDirtyBits = 0L;
|
||||
|
||||
// flush all unsynchronized changes in syncobjects
|
||||
// (Linq allocates, use for instead)
|
||||
for (int i = 0; i < syncObjects.Count; ++i)
|
||||
{
|
||||
syncObjects[i].Flush();
|
||||
}
|
||||
}
|
||||
|
||||
// this gets called in the constructor by the weaver
|
||||
// for every SyncObject in the component (e.g. SyncLists).
|
||||
// We collect all of them and we synchronize them with OnSerialize/OnDeserialize
|
||||
|
Loading…
Reference in New Issue
Block a user