using UnityEngine; using UnityEngine.Networking; namespace Cyber.Entities.SyncBases { /// /// A base class for all syncable components. An instance of /// will contain all of the game's synced components. /// public abstract class SyncBase : MonoBehaviour { /// /// The ID this syncable component can be found with from its parent /// . /// public int ID; /// /// Return the Sync Handletype information for . /// /// Sync Handletype containing sync information. public abstract SyncHandletype GetSyncHandletype(); /// /// Deserializes this SyncBase for further use. /// /// public abstract void Deserialize(NetworkReader reader); /// /// Serialize this SyncBase into a sync packet. /// /// public abstract void Serialize(NetworkWriter writer); /// /// Generates a checksum of the contents, or 0 if no checksum is overriden. /// /// The integer checksum. public virtual int GenerateChecksum() { return 0; } } }