public static void OnConnect(object sender, ConnectionEventArgs e) { Logger.Trace("Game-Client connected: {0}", e.Connection.ToString()); // atm, just creating a game - though clients should be able to join existing ones. var game = new Game(); Games.Add(game); var gameClient = new GameClient(e.Connection, game); gameClient.Game = game; e.Connection.Client = gameClient; }
public static Game CreateGame(int gameId) { var game = new Game(gameId); Games.Add(gameId, game); return game; }
public WorldGenerator(Mooege.Core.GS.Game.Game game) { this.Game = game; this.Paths = new Dictionary<int, string>(); LoadList("Assets/Maps/worlds.txt"); }
public GameClient(IConnection connection, Game game) { this.Connection = connection; this.Game = game; _outgoingBuffer.WriteInt(32, 0); }