示例#1
0
        public static GameUpdateMessage Create()
        {
            GameUpdateMessage g = new GameUpdateMessage();

            g.CharacterIds       = new List <ushort>();
            g.CharacterPositions = new List <Vector2>();
            return(g);
        }
示例#2
0
        public static Game CreateGame(string gameName, GameCreationData gameCreationData)
        {
            Game game = new Game();

            game.Lights        = new List <Light>();
            game.GameId        = nextGameId++;
            game.Players       = new List <Player>();
            game.Name          = gameName;
            game.MapObjects    = gameCreationData.MapObjects;
            game.SpawnPoints   = gameCreationData.SpawnPoints;
            game.UpdateMessage = GameUpdateMessage.Create();
            Clock.Tick        += game.Tick;

            return(game);
        }