Exemplo n.º 1
0
        public void ShatterIceball(int numIceballs)
        {
            SoundManager.Play3DSound(this, m_target, "Ice_Wizard_Attack_Glass");
            if (m_iceballSummon.SpriteName == "WizardIceSpell_Sprite")
            {
                m_iceballSummon.PlayAnimation("Grown", "End");
            }
            var projectileData = new ProjectileData(this)
            {
                SpriteName          = "WizardIceProjectile_Sprite",
                SourceAnchor        = m_spellOffset,
                Target              = null,
                Speed               = new Vector2(ProjectileSpeed, ProjectileSpeed),
                IsWeighted          = false,
                RotationSpeed       = 0f,
                Damage              = Damage,
                AngleOffset         = 0f,
                CollidesWithTerrain = false,
                Scale               = ProjectileScale
            };
            var   num  = 0f;
            float num2 = 360 / numIceballs;

            for (var i = 0; i < numIceballs; i++)
            {
                projectileData.Angle = new Vector2(num, num);
                var projectileObj = m_levelScreen.ProjectileManager.FireProjectile(projectileData);
                Tween.RunFunction(0.15f, this, "ChangeIceballState", projectileObj);
                num += num2;
            }
            projectileData.Dispose();
        }
Exemplo n.º 2
0
 public void CancelEarthSpell()
 {
     Tween.StopAllContaining(m_earthSummonOutSprite, false);
     Tween.StopAllContaining(this, false);
     Tween.To(m_earthSummonOutSprite, 0.5f, Linear.EaseNone, "ScaleX", "0", "ScaleY", "0");
     if (m_earthProjectileObj.CurrentFrame != 1 &&
         m_earthProjectileObj.CurrentFrame != m_earthProjectileObj.TotalFrames)
     {
         SoundManager.Play3DSound(this, m_target, "Earth_Wizard_Fall");
         m_earthProjectileObj.PlayAnimation("Grown", "End");
     }
     m_levelScreen.PhysicsManager.RemoveObject(m_earthProjectileObj);
 }
Exemplo n.º 3
0
        public void SummonFireball()
        {
            ResetFireball();
            var projectileData = new ProjectileData(this)
            {
                SpriteName          = "WizardFireballProjectile_Sprite",
                SourceAnchor        = m_spellOffset,
                Target              = m_target,
                Speed               = new Vector2(0f, 0f),
                IsWeighted          = false,
                RotationSpeed       = 0f,
                Damage              = Damage,
                AngleOffset         = 0f,
                CollidesWithTerrain = false,
                Scale               = MiniBossFireballSize
            };

            if (Difficulty == GameTypes.EnemyDifficulty.EXPERT)
            {
                projectileData.SpriteName = "GhostBossProjectile_Sprite";
            }
            SoundManager.Play3DSound(this, m_target, "Fire_Wizard_Form");
            m_fireballSummon                = m_levelScreen.ProjectileManager.FireProjectile(projectileData);
            m_fireballSummon.Opacity        = 0f;
            m_fireballSummon.Scale          = Vector2.Zero;
            m_fireballSummon.AnimationDelay = 0.1f;
            m_fireballSummon.PlayAnimation();
            m_fireballSummon.Rotation = 0f;
            Tween.To(m_fireballSummon, 0.5f, Back.EaseOut, "Opacity", "1", "ScaleX", MiniBossFireballSize.X.ToString(),
                     "ScaleY", MiniBossFireballSize.Y.ToString());
            projectileData.Dispose();
        }
Exemplo n.º 4
0
        public void SummonFireball()
        {
            ResetFireball();
            var projectileData = new ProjectileData(this)
            {
                SpriteName          = "WizardFireballProjectile_Sprite",
                SourceAnchor        = m_spellOffset,
                Target              = m_target,
                Speed               = new Vector2(0f, 0f),
                IsWeighted          = false,
                RotationSpeed       = 0f,
                Damage              = Damage,
                AngleOffset         = 0f,
                CollidesWithTerrain = false,
                DestroysWithEnemy   = false,
                Scale               = ProjectileScale
            };

            if (Difficulty == GameTypes.EnemyDifficulty.EXPERT)
            {
                projectileData.SpriteName          = "GhostBossProjectile_Sprite";
                projectileData.CollidesWithTerrain = false;
            }
            SoundManager.Play3DSound(this, m_target, "Fire_Wizard_Form");
            m_fireballSummon                = m_levelScreen.ProjectileManager.FireProjectile(projectileData);
            m_fireballSummon.Opacity        = 0f;
            m_fireballSummon.Scale          = Vector2.Zero;
            m_fireballSummon.AnimationDelay = 0.1f;
            m_fireballSummon.PlayAnimation();
            m_fireballSummon.Rotation = 0f;
            object arg_186_0 = m_fireballSummon;
            var    arg_186_1 = 0.5f;
            Easing arg_186_2 = Back.EaseOut;
            var    array     = new string[6];

            array[0] = "Opacity";
            array[1] = "1";
            array[2] = "ScaleX";
            var arg_165_0 = array;
            var arg_165_1 = 3;
            var x         = ProjectileScale.X;

            arg_165_0[arg_165_1] = x.ToString();
            array[4]             = "ScaleY";
            var arg_184_0 = array;
            var arg_184_1 = 5;
            var y         = ProjectileScale.Y;

            arg_184_0[arg_184_1] = y.ToString();
            Tween.To(arg_186_0, arg_186_1, arg_186_2, array);
            projectileData.Dispose();
        }
Exemplo n.º 5
0
        public void SummonIceball()
        {
            ResetIceball();
            var projectileData = new ProjectileData(this)
            {
                SpriteName          = "WizardIceSpell_Sprite",
                SourceAnchor        = m_spellOffset,
                Target              = null,
                Speed               = new Vector2(0f, 0f),
                IsWeighted          = false,
                RotationSpeed       = 0f,
                Damage              = Damage,
                AngleOffset         = 0f,
                CollidesWithTerrain = false,
                Scale               = MiniBossIceSize
            };

            SoundManager.Play3DSound(this, m_target, "Ice_Wizard_Form");
            m_iceballSummon = m_levelScreen.ProjectileManager.FireProjectile(projectileData);
            m_iceballSummon.PlayAnimation("Start", "Grown");
            projectileData.Dispose();
        }