/// <summary> /// Handles an incoming entity message /// </summary> /// <param name="message"></param> /// <returns></returns> private void HandleEntityNetworkMessage(MsgEntity message) { switch (message.Type) { case EntityMessageType.ComponentMessage: _entityManager.HandleEntityNetworkMessage(message); return; case EntityMessageType.EntityMessage: return; case EntityMessageType.SystemMessage: _entitySystemManager.HandleSystemMessage(message); return; } }
/// <summary> /// Converts a raw NetIncomingMessage to an IncomingEntityMessage object /// </summary> /// <param name="message">raw network message</param> /// <returns>An IncomingEntityMessage object</returns> public IncomingEntityMessage HandleEntityNetworkMessage(MsgEntity message) { switch (message.Type) { case EntityMessageType.ComponentMessage: return(new IncomingEntityMessage(message)); case EntityMessageType.EntityMessage: // TODO: Handle this. break; case EntityMessageType.SystemMessage: _entitySystemManager.HandleSystemMessage(message); break; } return(null); }