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