コード例 #1
0
        void StartRecieveSyncPhysicMessages(NetMessageType NetMessageType, NetIncomingMessage NetIncomingMessage)
        {
            int     id  = NetIncomingMessage.ReadInt32();
            IObject obj = (IObject)EntityMapper.getInstance().getEntity(id);

            PhysicObjectTypes tp = obj.PhysicObject.PhysicObjectTypes;

            if (Synchandlers.ContainsKey(obj.PhysicObject.PhysicObjectTypes))
            {
                Synchandlers[tp](NetIncomingMessage, obj);
            }
        }
コード例 #2
0
 public void UnRegisterMessagePhysicSync(PhysicObjectTypes type)
 {            
     Synchandlers.Remove(type);
 }
コード例 #3
0
 public void RegisterMessagePhysicSync(PhysicObjectTypes type , Action<NetIncomingMessage,IObject> handler)
 {            
     Debug.Assert(handler!=null);
     Synchandlers.Add(type, handler);
 }
コード例 #4
0
 public void UnRegisterMessagePhysicSync(PhysicObjectTypes type)
 {
     Synchandlers.Remove(type);
 }
コード例 #5
0
 public void RegisterMessagePhysicSync(PhysicObjectTypes type, Action <NetIncomingMessage, IObject> handler)
 {
     Debug.Assert(handler != null);
     Synchandlers.Add(type, handler);
 }