Exemple #1
0
        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;
        }
Exemple #2
0
 public static Game CreateGame(int gameId)
 {
     var game = new Game(gameId);
     Games.Add(gameId, game);
     return game;
 }
Exemple #3
0
 public WorldGenerator(Mooege.Core.GS.Game.Game game)
 {
     this.Game = game;
     this.Paths = new Dictionary<int, string>();
     LoadList("Assets/Maps/worlds.txt");
 }
Exemple #4
0
 public GameClient(IConnection connection, Game game)
 {
     this.Connection = connection;
     this.Game = game;
     _outgoingBuffer.WriteInt(32, 0);
 }