public NetStream BeginEvent(NetIdentity identity) { if (eventStream == null) { eventStream = NetStream.AllocStream(); } eventStream.WriteNetId(identity.sceneId); return(eventStream); }
private void Start() { identity = GetComponent <NetIdentity>(); if ((bool)identity) { instance = this; evtCheckpoint = identity.RegisterEvent(OnEnterCheckpoint); evtResetLevel = identity.RegisterEvent(OnResetLevel); } }
public void AddIdentity(NetIdentity identity) { identity.scope = this; map[identity.sceneId] = identity; int num = list.Count; while (num - 1 > 0 && list[num - 1].sceneId > identity.sceneId) { num--; } list.Insert(num, identity); }
public void StartNetwork(NetIdentity identity) { initialActive = base.gameObject.activeSelf; }
public void RemoveIdentity(NetIdentity identity) { map.Remove(identity.sceneId); list.Remove(identity); }
public void StartNetwork(NetIdentity identity) { }