//private BrainMapMarker currentMapMarker = null; public BrainMapManager(SpriteBatch spriteBatch, Soul game, AudioManager audioManager, InputManager controls, Vector2 position) { this.audioManager = audioManager; bg = new Sprite(spriteBatch, game, Constants.BRAIN_MAP_BG); mapList = new List<BrainMapMarker>(); List<BrainMapMarker> tmpList = new List<BrainMapMarker>(); /*mapList.Add(tmpList); tmpList = new List<BrainMapMarker>(); mapList.Add(tmpList); tmpList = new List<BrainMapMarker>(); mapList.Add(tmpList);*/ menuManager = new MenuManager(controls); ImageButton button = new ImageButton(spriteBatch, game, controls, new Vector2((float)Constants.RESOLUTION_VIRTUAL_WIDTH * 0.5f - 150, (float)Constants.RESOLUTION_VIRTUAL_HEIGHT * 0.5f + 200), Constants.GUI_CLEANSE, "cleanse"); button.onClick += new ImageButton.ButtonEventHandler(OnButtonPress); menuManager.AddButton(button); button = new ImageButton(spriteBatch, game, controls, new Vector2((float)Constants.RESOLUTION_VIRTUAL_WIDTH * 0.5f + 150, (float)Constants.RESOLUTION_VIRTUAL_HEIGHT * 0.5f + 200), Constants.GUI_BACK, "back"); button.onClick += new ImageButton.ButtonEventHandler(OnButtonPress); menuManager.AddButton(button); menuManager.initialize(); fadeinOut = new FadeInOut(spriteBatch, game, 100); this.position = position; offset = new Vector2((float)bg.X * 0.5f, (float)bg.Y *0.5f); this.controls = controls; }
public State(SpriteBatch spriteBatch, Soul game, AudioManager audioManager, InputManager controls, string id) { this.id = id; this.spriteBatch = spriteBatch; this.audio = audioManager; this.game = game; this.controls = controls; }
public TutorialManager(SpriteBatch spriteBatch, Soul game, SpriteFont spriteFont, InputManager inputManager) { this.tutorialList = new List<TutorialBase>(); this.spriteBatch = spriteBatch; this.game = game; this.spriteFont = spriteFont; this.inputManager = inputManager; }
public MenuStateManager(SpriteBatch spriteBatch, Soul game, GraphicsDeviceManager graphics, LinkedList<DisplayMode> displayModes, InputManager inputManager, AudioManager audioManager) { menu = new Dictionary<string, MenuManager>(); this.spriteBatch = spriteBatch; this.game = game; this.inputManager = inputManager; this.audioManager = audioManager; this.graphics = graphics; this.displayModes = displayModes; }
public ImageButton(SpriteBatch spriteBatch, Soul game, InputManager controls, Vector2 position, string filename, string id) : base(id) { this.controls = controls; this.position = position; button = new Sprite(spriteBatch, game, filename); hover = new Sprite(spriteBatch, game, Constants.MENU_HOVER); offset = button.Dimension * 0.5f; glowOffset = hover.Dimension * 0.5f; glowOffset.Y -= 6f; }
public BrainMapMarker(SpriteBatch spriteBatch, Soul game, InputManager controls, Vector2 position, string filename, string id, bool cleansed) : base(id) { this.cleansed = cleansed; marker = new Sprite(spriteBatch, game, filename); this.controls = controls; this.position = position; offset = new Vector2((float)marker.X * 0.5f, (float)marker.Y * 0.5f); status = new Sprite(spriteBatch, game, Constants.BRAIN_MAP_STATUS); if (cleansed == true) { statusSecond = new Sprite(spriteBatch, game, Constants.BRAIN_MAP_CLEANSED); glowFX = new GlowFX(game, Constants.FLASH_EFFECT_GREEN_FILENAME, 0.01f, .4f, .8f); } else { statusSecond = new Sprite(spriteBatch, game, Constants.BRAIN_MAP_INFECTED); glowFX = new GlowFX(game, Constants.FLASH_EFFECT_RED_FILENAME, 0.01f, .4f, .8f); } }
public MenuState(SpriteBatch spriteBatch, Soul game, GraphicsDeviceManager graphics, LinkedList<DisplayMode> displayModes, AudioManager audioManager, InputManager controls, string id) : base(spriteBatch, game, audioManager, controls, id) { this.graphics = graphics; this.displayModes = displayModes; }
public IntroState(SpriteBatch spriteBatch, Soul game, AudioManager audioManager, InputManager controls, string id) : base(spriteBatch, game, audioManager, controls, id) { }
protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); // Intro sounds audioManager.addEffect(audioList.getValue("Intro", "startup"), "intro_startup"); // Main Menu Sounds audioManager.addEffect(audioList.getValue("MainMenu", "move"), "menu_move"); audioManager.addEffect(audioList.getValue("MainMenu", "select"), "menu_select"); audioManager.addEffect(audioList.getValue("MainMenu", "start"), "menu_start"); audioManager.addSong(audioList.getValue("MainMenu", "music"), "menu_music"); // World Map Sounds audioManager.addEffect(audioList.getValue("WorldMap", "select"), "map_select"); audioManager.addEffect(audioList.getValue("WorldMap", "move"), "map_move"); audioManager.addEffect(audioList.getValue("WorldMap", "selectMap"), "map_select_map"); audioManager.addEffect(audioList.getValue("WorldMap", "back"), "map_back"); audioManager.addSong(audioList.getValue("WorldMap", "music"), "map_music"); // In Game Sounds audioManager.addEffect(audioList.getValue("InGame", "player_shoot"), "player_shoot"); audioManager.addEffect(audioList.getValue("InGame", "player_die"), "player_die"); audioManager.addEffect(audioList.getValue("InGame", "player_powerup_pickup"), "player_powerup_pickup"); audioManager.addEffect(audioList.getValue("InGame", "dark_thought_shoot"), "dark_thought_shoot"); audioManager.addEffect(audioList.getValue("InGame", "dark_thought_die"), "dark_thought_die"); audioManager.addEffect(audioList.getValue("InGame", "red_bloodvessel_die"), "red_bloodvessel_die"); audioManager.addEffect(audioList.getValue("InGame", "blue_bloodvessel_die"), "blue_bloodvessel_die"); audioManager.addEffect(audioList.getValue("InGame", "purple_bloodvessel_die"), "purple_bloodvessel_die"); audioManager.addEffect(audioList.getValue("InGame", "nightmare_die"), "nightmare_die"); audioManager.addEffect(audioList.getValue("InGame", "nightmare_hit"), "nightmare_hit"); audioManager.addEffect(audioList.getValue("InGame", "inner_demon_die"), "inner_demon_die"); audioManager.addEffect(audioList.getValue("InGame", "lesser_demon_spawn"), "lesser_demon_spawn"); audioManager.addEffect(audioList.getValue("InGame", "lesser_demon_die"), "lesser_demon_die"); audioManager.addEffect(audioList.getValue("InGame", "dark_whisper_die"), "dark_whisper_die"); audioManager.addEffect(audioList.getValue("InGame", "dark_whisper_release_spikes"), "release_spikes"); audioManager.addEffect(audioList.getValue("InGame", "pause_appear"), "pause_appear"); audioManager.addSong(audioList.getValue("InGame", "music"), "main_music"); audioManager.addSong(audioList.getValue("InGame", "music_secondary"), "secondary_music"); stateManager = new StateManager(); controls = new InputManager(this); State state = new IntroState(spriteBatch, this, audioManager, controls, "IntroState"); stateManager.AddState(state); state = new MenuState(spriteBatch, this, graphics, displayModes, audioManager, controls, "MenuState"); stateManager.AddState(state); state = new CreditsState(spriteBatch, this, audioManager, controls, "CreditsState"); stateManager.AddState(state); state = new WorldMapState(spriteBatch, this, audioManager, controls, "WorldMapState"); stateManager.AddState(state); state = new PlayState(spriteBatch, this, audioManager, controls, "PlayState"); stateManager.AddState(state); state = new WarningState(spriteBatch, this, audioManager, controls, "WarningState"); stateManager.AddState(state); stateManager.SetState(config.getValue("General", "StartState")); }
public Level(SpriteBatch spriteBatch, Soul game, AudioManager audioManager, EntityManager entityManager, Player player, InputManager controls, string filename, string id) { this.spriteBatch = spriteBatch; this.game = game; this.entityManager = entityManager; this.id = id; this.controls = controls; levelReader = new LevelReader(filename, game); this.player = player; font = game.Content.Load<SpriteFont>("GUI\\Extrafine"); this.audioManager = audioManager; }
public Player(SpriteBatch spriteBatch, Soul game, AudioManager audioManager, string alias, EntityManager entityManager, InputManager controls) : base(spriteBatch, game, Constants.PLAYER_FILENAME, new Vector2(Constants.PLAYER_WIDTH, Constants.PLAYER_HEIGHT), alias, EntityType.PLAYER) { audio = audioManager; this.entityManager = entityManager; this.controls = controls; weapon = new PlayerWeapon(spriteBatch, game, (int)dimension.Y); weapon.Damage = damage; acceleration = new Vector2 (Constants.PLAYER_ACCELERATION); animationState = (int)PlayerAnimationState.IDLE; hitFx = new HitFX(game); warningGlow = new GlowFX(game, Constants.FLASH_EFFECT_RED_FILENAME, 0.05f, 0.1f, 0.9f); this.animation.FrameRate = 30; this.maxDeathLightDecay = int.Parse(game.lighting.getValue("PlayerDeath", "MaxDecay")); this.maxDeathPower = float.Parse(game.lighting.getValue("PlayerDeath", "MaxPower")); this.deathDecayScaleUp = int.Parse(game.lighting.getValue("PlayerDeath", "DecayScaleUp")); this.deathDecayScaleDown = int.Parse(game.lighting.getValue("PlayerDeath", "DecayScaleDown")); this.deathPowerScaleUp = float.Parse(game.lighting.getValue("PlayerDeath", "PowerScaleUp")); this.deathPowerScaleDown = float.Parse(game.lighting.getValue("PlayerDeath", "PowerScaleDown")); this.secondExplosionLight = int.Parse(game.lighting.getValue("PlayerDeath", "SecondExplosionLightSize")); this.secondExplosionLightScalar = int.Parse(game.lighting.getValue("PlayerDeath", "SecondExplosionLightScalar")); this.secondExplosionPower = float.Parse(game.lighting.getValue("PlayerDeath", "SecondExplosionPower")); this.secondExplosionPwrScalar = float.Parse(game.lighting.getValue("PlayerDeath", "SecondExplosionPowerScalar")); this.fadeOutLight = int.Parse(game.lighting.getValue("PlayerDeath", "FadeOutLightScalar")); this.fadeOutPower = float.Parse(game.lighting.getValue("PlayerDeath", "FadeOutPowerScalar")); this.healthLightMaxRadius = int.Parse(game.lighting.getValue("PlayerHealthLight", "MaxRadius")); this.healthLightMinRadius = int.Parse(game.lighting.getValue("PlayerHealthLight", "MinRadius")); this.playerMaxSpeed = float.Parse(game.constants.getValue("PLAYER", "SPEED")); this.healthPowerup = int.Parse(game.constants.getValue("HEALTH_POWERUP", "HEALTH")); this.tutorial = bool.Parse(game.config.getValue("General", "Tutorial")); this.animation.playOnce = true; this.animation.FrameRate = 150; this.currentHealthRadi = healthLightMaxRadius; this.playerHealthLight = new PlayerHealthLight(game, health); this.spriteFont = game.Content.Load<SpriteFont>(Constants.GUI_FONT); string key = game.config.getValue("Controls", "Shoot"); if (key == "Space") { lesserDemonTut = new TutorialString(spriteBatch, game, "shoot", spriteFont, key, Constants.TUTORIAL_BUTTON_FRAME_XLLARGE, new Vector2(120.0f, 0f)); } else if (key == "Enter") { lesserDemonTut = new TutorialSprite(spriteBatch, game, "shoot", Constants.TUTORIAL_BUTTON_ENTER, Constants.TUTORIAL_BUTTON_FRAME_ENTER, new Vector2(120.0f, 0f)); } else if (key == "LeftShift" || key == "RightShift" || key == "LeftAlt" || key == "RightAlt") { lesserDemonTut = new TutorialSprite(spriteBatch, game, "shoot", Constants.TUTORIAL_BUTTON_SHIFT, Constants.TUTORIAL_BUTTON_FRAME_LARGE, new Vector2(120.0f, 0f)); } else { lesserDemonTut = new TutorialString(spriteBatch, game, "shoot", spriteFont, key, Constants.TUTORIAL_BUTTON_FRAME, new Vector2(120.0f, 0f)); } pointLight = new PointLight() { Color = new Vector4(float.Parse(game.lighting.getValue("PlayerLight", "ColorR")), float.Parse(game.lighting.getValue("PlayerLight", "ColorG")), float.Parse(game.lighting.getValue("PlayerLight", "ColorB")), float.Parse(game.lighting.getValue("PlayerLight", "ColorA"))), Power = float.Parse(game.lighting.getValue("PlayerLight", "Power")), LightDecay = int.Parse(game.lighting.getValue("PlayerLight", "LightDecay")), Position = new Vector3(0f, 0f, float.Parse(game.lighting.getValue("PlayerLight", "ZPosition"))), IsEnabled = true, renderSpecular = bool.Parse(game.lighting.getValue("PlayerLight", "Specular")) }; }