예제 #1
0
        protected override void initSkills()
        {
            SoundEffect   sfx       = LoadingUtils.load <SoundEffect>(content, "FireBurst");
            SkillFinished fireBurst = delegate() {
                float effectLife;
                Base2DSpriteDrawable shockWave = ModelGenerationUtil.generateWaveEffect(content, base.Position, Color.Red, out effectLife);
                VisualEffect         effect    = new VisualEffect(shockWave, effectLife);
                EffectsManager.getInstance().Visuals.Add(effect);
            };


            this.skills.Add(new FirstBurst(sfx, 2f, fireBurst));
        }
예제 #2
0
        protected override void initSkills()
        {
            SoundEffect   sfx       = LoadingUtils.load <SoundEffect>(content, "Curse");
            SkillFinished holySwirl = delegate() {
                float effectLife;
                Base2DSpriteDrawable shockWave = ModelGenerationUtil.generateWaveEffect(content, base.Position, Color.LightBlue, out effectLife);
                VisualEffect         effect    = new VisualEffect(shockWave, effectLife);
                EffectsManager.getInstance().Visuals.Add(effect);
            };
            // this skill scales based on the level, start at 2000, get to 1600
            int cooldown = 1800;
            int index    = GameStateMachine.getInstance().LevelContext.MapIndex - 1;

            if (index != 0)
            {
                //cooldown = cooldown = 1600;
            }

            this.skills.Add(new HolySwirl(sfx, 2f, holySwirl, cooldown));
        }
예제 #3
0
        private void initSkills()
        {
            SoundEffect booSfx    = LoadingUtils.load <SoundEffect>(content, "QuickShot");
            SoundEffect shriekSfx = LoadingUtils.load <SoundEffect>(content, "Boo");
            SoundEffect whooshSfx = LoadingUtils.load <SoundEffect>(content, "Whoosh");

            SkillFinished appear = delegate() {
                int alpha = 255;
                resetFadeEffect(this.fadeEffect, alpha, FadeEffect.FadeState.PartialIn);
                resetFadeEffect(this.selectedFadeEffect, alpha, FadeEffect.FadeState.PartialIn);
                this.state = State.Visisble;
            };
            SkillFinished disappear = delegate() {
                int alpha = 75;
                resetFadeEffect(this.fadeEffect, alpha, FadeEffect.FadeState.PartialOut);
                resetFadeEffect(this.selectedFadeEffect, alpha, FadeEffect.FadeState.PartialOut);
                this.state = State.Invisible;
                this.observerHandler.notifyGhostChange(this);
            };

            SkillFinished shriek = delegate() {
                int alpha = 255;
                resetFadeEffect(this.fadeEffect, alpha, FadeEffect.FadeState.PartialIn);
                resetFadeEffect(this.selectedFadeEffect, alpha, FadeEffect.FadeState.PartialIn);
                this.state = State.Visisble;

                float effectLife;
                Base2DSpriteDrawable shockWave = ModelGenerationUtil.generateWaveEffect(content, base.Position, Color.Orange, out effectLife);
                VisualEffect         effect    = new VisualEffect(shockWave, effectLife);
                EffectsManager.getInstance().Visuals.Add(effect);
            };

            SkillFinished boo = delegate() {
                int alpha = 255;
                resetFadeEffect(this.fadeEffect, alpha, FadeEffect.FadeState.PartialIn);
                resetFadeEffect(this.selectedFadeEffect, alpha, FadeEffect.FadeState.PartialIn);
                this.state = State.Visisble;


                float effectLife;
                Base2DSpriteDrawable shockWave = ModelGenerationUtil.generateWaveEffect(content, base.Position, Color.Green, out effectLife);
                VisualEffect         effect    = new VisualEffect(shockWave, effectLife);
                EffectsManager.getInstance().Visuals.Add(effect);
            };
            Skill booSkill    = new Boo(booSfx, boo);
            Skill shriekSkill = new Shriek(shriekSfx, shriek);
            Skill appearSkill = new Appear(whooshSfx, appear);
            Skill hideSkill   = new Disappear(whooshSfx, disappear);

            this.aggressiveSkills = new Dictionary <Keys, Skill>();
            this.aggressiveSkills.Add(Keys.D1, booSkill);
            this.aggressiveSkills.Add(Keys.D2, shriekSkill);

            this.passiveskills = new Dictionary <Keys, Skill>();
            this.passiveskills.Add(Keys.D3, appearSkill);
            this.passiveskills.Add(Keys.D4, hideSkill);

            this.Skills = new List <Skill>();
            this.Skills.Add(booSkill);
            this.Skills.Add(shriekSkill);
            this.Skills.Add(appearSkill);
            this.Skills.Add(hideSkill);
        }