示例#1
0
        public GamePlay(Game1 game, Level level)
            : base(game)
        {
            Level = level;
            Level.Initialize();
            container = new ObjectContainer(Level.Bounds);
            PathFinder.Initialize(container);
            NetCommander.RegisterWorldWithNetwork(container);
            Camera.Instantiate(GameRef.screenRectangleActual);
            PlayerFactory.Initialize(this);
            TowerFactory.Initialize(this);
            NetworkFactory.Initialize(this);
            ProjectileFactory.Initialize(this);

            //SoundManager.CrossfadeMusic(5000, AssetRepository.Instance.Music1);
        }
示例#2
0
        private void StartWithLevel(Level level)
        {
            MechanicSingleton.InitializeWithSettings("ServerTesting", 12);

            var network = new NetworkServer();
            network.StartHosting();

            NetCommander.SetNetwork(network);

            var gameplayServer = new GamePlay(GameRef, level);
            GameRef.ChangeGameState(gameplayServer);
        }
示例#3
0
        public Level GetLevel2()
        {
            var level2 = new Level();

            return level2;
        }
示例#4
0
 public Level GetLevel1()
 {
     var level1 = new Level();
     level1.SetGameDirector(new GameDirectorBase());
     return level1;
 }