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); } }
public void UnRegisterMessagePhysicSync(PhysicObjectTypes type) { Synchandlers.Remove(type); }
public void RegisterMessagePhysicSync(PhysicObjectTypes type , Action<NetIncomingMessage,IObject> handler) { Debug.Assert(handler!=null); Synchandlers.Add(type, handler); }
public void RegisterMessagePhysicSync(PhysicObjectTypes type, Action <NetIncomingMessage, IObject> handler) { Debug.Assert(handler != null); Synchandlers.Add(type, handler); }