Example #1
0
        public Boss(SpriteBatch spriteBatch, Soul game, AudioManager audio, GameTime gameTime, string alias, EntityManager entityManager)
            : base(spriteBatch, game, Constants.BOSS_IDLE_FILENAME, new Vector2(Constants.BOSS_WIDTH, Constants.BOSS_HEIGHT), alias, EntityType.BOSS)
        {
            spriteIdle = new Sprite(spriteBatch, game, Constants.BOSS_IDLE_FILENAME);
            spriteShoot = new Sprite(spriteBatch, game, Constants.BOSS_SHOOT_FILENAME);
            spriteSpawn = new Sprite(spriteBatch, game, Constants.BOSS_SPAWN_FILENAME);
            spriteDeath = new Sprite(spriteBatch, game, Constants.BOSS_DEATH_FILENAME);

            this.sprite = spriteSpawn;
            this.animation.MaxFrames = 0;

            animation2 = new Animation(((int)(spriteShoot.X / dimension.X)) - 1);

            this.entityManager = entityManager;
            weapon = new BossWeapon(spriteBatch, game, sprite.Y);
            weapon.Damage = damage;
            offset = Vector2.Zero;

            this.random = new Random();
            hitFx = new HitFX(game);
            velocity.X = 5;
            this.audio = audio;

            fireRate = burst;
            burstPause = int.Parse(game.constants.getValue("BOSS", "BURSTPAUSE"));
        }
Example #2
0
 public BloodVessel(SpriteBatch spriteBatch, Soul game, AudioManager audioManager, EntityManager entityManager, Vector2 dimension, EntityType entityType, string alias, string filename)
     : base(spriteBatch, game, filename, dimension, alias, entityType)
 {
     this.audio = audioManager;
     this.entityManager = entityManager;
     this.animation.MaxFrames = 0;
     hitFx = new HitFX(game);
 }
Example #3
0
 public Nightmare(SpriteBatch spriteBatch, Soul game, AudioManager audioManager, EntityManager entityManager, string alias)
     : base(spriteBatch, game, Constants.NIGHTMARE_FILENAME, new Vector2(Constants.NIGHTMARE_WIDTH, Constants.NIGHTMARE_HEIGHT), alias, EntityType.NIGHTMARE)
 {
     this.entityManager = entityManager;
     //this.maxVelocity = new Vector2 (Constants.NIGHTMARE_MAX_SPEED, Constants.NIGHTMARE_MAX_SPEED);
     this.acceleration = new Vector2 (Constants.NIGHTMARE_ACCELERATION, Constants.NIGHTMARE_ACCELERATION);
     //this.health = Constants.NIGHTMARE_MAX_HEALTH;
     //this.damage = Constants.NIGHTMARE_DAMAGE;
     this.animation.MaxFrames = 12;
     hitFx = new HitFX(game);
     //this.hitRadius = Constants.NIGHTMARE_RADIUS;
     this.audio = audioManager;
 }
Example #4
0
 public InnerDemon(SpriteBatch spriteBatch, Soul game, AudioManager audioManager, string alias, EntityManager entityManager, Path path)
     : base(spriteBatch, game, Constants.INNER_DEMON_FILENAME, new Vector2(Constants.INNER_DEMON_WIDTH, Constants.INNER_DEMON_HEIGHT), alias, EntityType.INNER_DEMON)
 {
     this.path = path;
     this.path.Repeat = true;
     //maxVelocity = new Vector2(Constants.INNER_DEMON_MAX_SPEED, Constants.INNER_DEMON_MAX_SPEED);
     acceleration = new Vector2(Constants.INNER_DEMON_ACCELERATION, Constants.INNER_DEMON_ACCELERATION);
     //this.health = Constants.INNER_DEMON_MAX_HEALTH;
     this.entityManager = entityManager;
     this.random = new Random();
     hitFx = new HitFX(game);
     //this.hitRadius = Constants.INNER_DEMON_RADIUS;
     this.audio = audioManager;
     animation.MaxFrames = 0;
 }
Example #5
0
 public DarkThought(SpriteBatch spriteBatch, Soul game, AudioManager audioManager, GameTime gameTime, string alias, EntityManager entityManager, Path path)
     : base(spriteBatch, game, Constants.DARK_THOUGHT_FILENAME, new Vector2(Constants.DARK_THOUGHT_WIDTH, Constants.DARK_THOUGHT_HEIGHT), alias, EntityType.DARK_THOUGHT)
 {
     this.audio = audioManager;
     this.entityManager = entityManager;
     weapon = new DarkThoughtWeapon(spriteBatch, game, sprite.Y);
     weapon.Damage = damage;
     //maxVelocity = new Vector2(Constants.DARK_THOUGHT_MAX_SPEED, Constants.DARK_THOUGHT_MAX_SPEED);
     acceleration = new Vector2(Constants.DARK_THOUGHT_ACCELERATION, Constants.DARK_THOUGHT_ACCELERATION);
     this.path = path;
     //this.health = Constants.DARK_THOUGHT_MAX_HEALTH;
     this.animation.MaxFrames = 11;
     hitFx = new HitFX(game);
     //this.hitRadius = Constants.DARK_THOUGHT_RADIUS;
     timeSinceLastBullet = gameTime.TotalGameTime.TotalMilliseconds;
     timeSinceLastBurst = gameTime.TotalGameTime.TotalMilliseconds;
 }
Example #6
0
 public DarkWhisper(SpriteBatch spriteBatch, Soul game, AudioManager audioManager, string alias, EntityManager entityManager, Path path)
     : base(spriteBatch, game, Constants.DARK_WHISPER_FILENAME, new Vector2(Constants.DARK_WHISPER_WIDTH, Constants.DARK_WHISPER_HEIGHT), alias, EntityType.DARK_WHISPER)
 {
     if (path != null)
     {
         this.path = path;
         this.chase = false;
     }
     this.entityManager = entityManager;
     //this.health = Constants.DARK_WHISPER_MAX_HEALTH;
     //this.maxVelocity =  new Vector2(Constants.DARK_WHISPER_MAX_SPEED);
     this.acceleration = new Vector2(Constants.DARK_WHISPER_ACCELERATION);
     spikeList = new List<Bullet>();
     this.animation.MaxFrames = 0;
     this.animation.FrameRate = 50;
     hitFx = new HitFX(game);
     this.audio = audioManager;
     //this.hitRadius = Constants.DARK_WHISPER_RADIUS;
 }
Example #7
0
        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"))
            };
        }