Exemple #1
0
        private IEnumerator DoSlash(float angle, float delay)
        {
            yield return(new WaitForSeconds(delay));

            float actDamage     = this.SlashDamage;
            float actKnockback  = this.slashKnockback;
            float bossDMGMult   = this.SlashBossMult;
            float jammedDMGMult = this.SlashJammedMult;

            if (SlashDamageUsesBaseProjectileDamage)
            {
                actDamage     = this.m_projectile.baseData.damage;
                bossDMGMult   = this.m_projectile.BossDamageMultiplier;
                jammedDMGMult = this.m_projectile.BlackPhantomDamageMultiplier;
                actKnockback  = this.m_projectile.baseData.force;
            }
            if (UsesAngleVariance)
            {
                angle += UnityEngine.Random.Range(MinSlashAngleOffset, MaxSlashAngleOffset);
            }
            SlashDoer.DoSwordSlash(this.m_projectile.specRigidbody.UnitCenter, (this.m_projectile.Direction.ToAngle() + angle), owner, playerKnockback, this.InteractMode, actDamage, actKnockback, this.m_projectile.statusEffectsToApply, null, jammedDMGMult, bossDMGMult, SlashRange, SlashDimensions);
            if (DoSound)
            {
                AkSoundEngine.PostEvent(soundToPlay, this.m_projectile.gameObject);
            }
            SlashVFX.SpawnAtPosition(this.m_projectile.specRigidbody.UnitCenter, this.m_projectile.Direction.ToAngle() + angle, null, null, null, -0.05f);
            if (DestroyBaseAfterFirstSlash)
            {
                Suicide();
            }
            yield break;
        }
Exemple #2
0
        private IEnumerator DoSlash(float angle, float delay)
        {
            yield return(new WaitForSeconds(delay));

            if (SlashDamageUsesBaseProjectileDamage)
            {
                SlashDamage     = this.m_projectile.baseData.damage;
                SlashBossMult   = this.m_projectile.BossDamageMultiplier;
                SlashJammedMult = this.m_projectile.BlackPhantomDamageMultiplier;
                slashKnockback  = this.m_projectile.baseData.force;
            }
            if (UsesAngleVariance)
            {
                angle += UnityEngine.Random.Range(MinSlashAngleOffset, MaxSlashAngleOffset);
            }
            ProjectileSlashingBehaviour slash = this.GetComponent <ProjectileSlashingBehaviour>();

            if (slash != null)//just to be safe, who knows what stupid shit could possibly happen. i literally cant think of any way it would ever be null.
            {
                if (PostProcessSlash != null)
                {
                    PostProcessSlash(GameManager.Instance.PrimaryPlayer, slash);
                }
            }
            SlashDoer.GrabBoolsAndValuesAndShitForTheFuckingSlashingApplyEffect(AppliesStun, StunApplyChance, StunTime);
            SlashDoer.DoSwordSlash(this.m_projectile.specRigidbody.UnitCenter, (this.m_projectile.Direction.ToAngle() + angle), owner, playerKnockback, this.InteractMode, SlashDamage, slashKnockback, effects, null, SlashJammedMult, SlashBossMult, SlashRange, SlashDimensions);
            if (DoSound)
            {
                AkSoundEngine.PostEvent(soundToPlay, this.m_projectile.gameObject);
            }
            SlashVFX.SpawnAtPosition(this.m_projectile.specRigidbody.UnitCenter, this.m_projectile.Direction.ToAngle() + angle, null, null, null, -0.05f);
            if (DestroyBaseAfterFirstSlash)
            {
                Suicide();
            }

            yield break;
        }