Example #1
0
 public NetStream BeginEvent(NetIdentity identity)
 {
     if (eventStream == null)
     {
         eventStream = NetStream.AllocStream();
     }
     eventStream.WriteNetId(identity.sceneId);
     return(eventStream);
 }
Example #2
0
 private void Start()
 {
     identity = GetComponent <NetIdentity>();
     if ((bool)identity)
     {
         instance      = this;
         evtCheckpoint = identity.RegisterEvent(OnEnterCheckpoint);
         evtResetLevel = identity.RegisterEvent(OnResetLevel);
     }
 }
Example #3
0
        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;
 }
Example #5
0
 public void RemoveIdentity(NetIdentity identity)
 {
     map.Remove(identity.sceneId);
     list.Remove(identity);
 }
Example #6
0
 public void StartNetwork(NetIdentity identity)
 {
 }