public Client(RenderWindow window, ImageManager imageManager) : base(window, imageManager) { this.window = window; world = new RenderImage(800, 600); inputManager = new InputManager(this); ticker = new Ticker(); window.ShowMouseCursor (false); window.SetFramerateLimit (60); NetPeerConfiguration netConfiguration = new NetPeerConfiguration("2dThing"); client = new NetClient(netConfiguration); uMsgBuffer = new UserMessageBuffer(); otherClients = new Dictionary<int, NetworkClient>(); chat = new Chat(this); LoadRessources(); blockTypeDisplay = new Cube(blockType, imageManager); blockTypeDisplay.Position = new Vector2f(window.Width - 2*Cube.WIDTH, window.Height - 2* Cube.HEIGHT); layerDisplay = new LayerDisplay(imageManager); layerDisplay.Position = blockTypeDisplay.Position - new Vector2f(0, 50); mouse = new Sprite (imageManager.GetImage("mouse")); }
public Server(ImageManager imageManager) { this.imageManager = imageManager; this.ticker = new Ticker(); NetPeerConfiguration netConfiguration = new NetPeerConfiguration("2dThing"); netConfiguration.Port = 55017; server = new NetServer(netConfiguration); clientList = new Dictionary<NetConnection, NetworkClient>(); }