/// <summary> /// Initializes a new instance of the <see cref="ClientPacketHandler"/> class. /// </summary> /// <param name="networkSender">The socket sender.</param> /// <param name="screenManager">The <see cref="IScreenManager"/>.</param> /// <param name="dynamicEntityFactory">The <see cref="IDynamicEntityFactory"/> used to serialize /// <see cref="DynamicEntity"/>s.</param> /// <exception cref="ArgumentNullException"><paramref name="dynamicEntityFactory" /> is <c>null</c>.</exception> /// <exception cref="ArgumentNullException"><paramref name="screenManager" /> is <c>null</c>.</exception> /// <exception cref="ArgumentNullException"><paramref name="networkSender" /> is <c>null</c>.</exception> public ClientPacketHandler(INetworkSender networkSender, IScreenManager screenManager, IDynamicEntityFactory dynamicEntityFactory) { if (dynamicEntityFactory == null) { throw new ArgumentNullException("dynamicEntityFactory"); } if (screenManager == null) { throw new ArgumentNullException("screenManager"); } if (networkSender == null) { throw new ArgumentNullException("networkSender"); } _networkSender = networkSender; _dynamicEntityFactory = dynamicEntityFactory; _screenManager = screenManager; _peerTradeInfoHandler = new ClientPeerTradeInfoHandler(networkSender); _peerTradeInfoHandler.GameMessageCallback += PeerTradeInfoHandler_GameMessageCallback; _objGrabber = new ObjGrabber(this); }
/// <summary> /// Initializes a new instance of the <see cref="ClientPacketHandler"/> class. /// </summary> /// <param name="networkSender">The socket sender.</param> /// <param name="screenManager">The <see cref="IScreenManager"/>.</param> /// <param name="dynamicEntityFactory">The <see cref="IDynamicEntityFactory"/> used to serialize /// <see cref="DynamicEntity"/>s.</param> /// <exception cref="ArgumentNullException"><paramref name="dynamicEntityFactory" /> is <c>null</c>.</exception> /// <exception cref="ArgumentNullException"><paramref name="screenManager" /> is <c>null</c>.</exception> /// <exception cref="ArgumentNullException"><paramref name="networkSender" /> is <c>null</c>.</exception> public ClientPacketHandler(INetworkSender networkSender, IScreenManager screenManager, IDynamicEntityFactory dynamicEntityFactory) { if (dynamicEntityFactory == null) throw new ArgumentNullException("dynamicEntityFactory"); if (screenManager == null) throw new ArgumentNullException("screenManager"); if (networkSender == null) throw new ArgumentNullException("networkSender"); _networkSender = networkSender; _dynamicEntityFactory = dynamicEntityFactory; _screenManager = screenManager; _peerTradeInfoHandler = new ClientPeerTradeInfoHandler(networkSender); _peerTradeInfoHandler.GameMessageCallback += PeerTradeInfoHandler_GameMessageCallback; _objGrabber = new ObjGrabber(this); }
public MapUndoManager(EditorMap map, IDynamicEntityFactory dynamicEntityFactory) { Map = map; DynamicEntityFactory = dynamicEntityFactory; }
/// <summary> /// Initializes the <see cref="EditorDynamicEntityFactory"/> class. /// </summary> static EditorDynamicEntityFactory() { _instance = new EditorDynamicEntityFactory(); }
/// <summary> /// Initializes the <see cref="DynamicEntityFactory"/> class. /// </summary> static DynamicEntityFactory() { _instance = new DynamicEntityFactory(); }