public HostWaitState(IStateManager manager, DroughtGame game) : base(manager, game) { stateManager = manager; networkManager = game.getNetworkManager(); loadContent(); }
public MenuState(IStateManager manager, DroughtGame game, int width, int height) : base(manager, game) { screenWidth = width; screenHeight = height; loadContent(); initialise(); networkManager = game.getNetworkManager(); }
public DroughtGame() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; IsMouseVisible = true; if (NETWORKED) Components.Add(new GamerServicesComponent(this)); gameManager = new GameManager(this); soundManager = SoundManager.getInstance(); networkManager = NetworkManager.getInstance(); }
public NetLevelState(IStateManager manager, DroughtGame game, Level aLevel, bool isHost) : base(manager, game) { soundManager = game.getSoundManager(); networkManager = game.getNetworkManager(); hosting = isHost; input = DeviceInput.getInput(); sun = new Sun(new Vector3(0, -200, 200)); levelInfo = new LevelInfo(); levelInfo.initialise(aLevel); List<List<Vector3>> waterList = Water.findWater(levelInfo); waters = new Water[waterList.Count]; for (int i = 0; i < waters.Length; i++) waters[i] = new Water(waterList[i], levelInfo, sun, getGraphics()); aStar = new AStar(levelInfo); rain = new PlaneParticleEmitter(512, 256, new Vector3(256, 128, 200), new Vector3(0, 0, 0), new Vector3(3f, 0, -19f), Color.LightBlue.ToVector4(), 100000, 9); camera = new Camera(this, levelInfo, false); terrain = new Terrain(getGraphics(), getContentManager(), levelInfo, camera); soundManager.setListener(camera); modelLoader = new ModelLoader(getContentManager(), getGraphics()); skybox = new Skybox(camera, sun, modelLoader.getModel3D(modelType.Skybox)); lineTool = new LineTool(getGraphics()); loadContent(); initializeEntities(); foreach (MovableEntity entity in localEntities) soundManager.playSound(SoundHandle.Truck, entity); }