1
Fork 0
mirror of https://github.com/Steffo99/better-tee.git synced 2024-11-22 23:34:18 +00:00
better-tee/Assets/Old/Packages/Mirror/Runtime/SyncObject.cs

27 lines
805 B
C#
Raw Normal View History

2019-09-17 15:43:32 +00:00
namespace Mirror
{
// A sync object is an object that can synchronize it's state
// between server and client, such as a SyncList
public interface SyncObject
{
// true if there are changes since the last flush
bool IsDirty { get; }
// Discard all the queued changes
// Consider the object fully synchronized with clients
void Flush();
// Write a full copy of the object
void OnSerializeAll(NetworkWriter writer);
// Write the changes made to the object
void OnSerializeDelta(NetworkWriter writer);
// deserialize all the data in the object
void OnDeserializeAll(NetworkReader reader);
// deserialize changes since last sync
void OnDeserializeDelta(NetworkReader reader);
}
}