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); }
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); }
public Level GetLevel2() { var level2 = new Level(); return level2; }
public Level GetLevel1() { var level1 = new Level(); level1.SetGameDirector(new GameDirectorBase()); return level1; }