示例#1
0
        private static bool Prefix(Projectile __instance, Collider other, float ___m_strength)
        {
            if (!other || other.isTrigger)
            {
                return(true);
            }
            var proj = __instance;

            if (NetworkMatch.GetMode() == MatchMode.MONSTERBALL && other.gameObject.layer == 31)
            {
                if (proj.m_owner_player)
                {
                    MonsterballAddon.SetPlayer(proj.m_owner_player);
                }
                if (proj.m_type == ProjPrefab.proj_thunderbolt)
                {
                    Vector3 vector = other.transform.position - proj.transform.position;
                    other.attachedRigidbody.AddForce(vector.normalized * 340f * ___m_strength + vector.normalized * 60f, ForceMode.Impulse);
                    ParticleElement particleElement = ParticleManager.psm[3].StartParticle((int)proj.m_death_particle_default, proj.c_transform.localPosition, proj.c_transform.localRotation, null, null, false);
                    particleElement.SetExplosionOwner(proj.m_owner);
                    particleElement.SetParticleScaleAndSimSpeed(1f + ___m_strength * 0.25f, 1f - ___m_strength * 0.15f);
                    GameManager.m_audio.PlayCuePos(255, proj.c_transform.localPosition, 0.7f, UnityEngine.Random.Range(-0.15f, 0.15f), 0f, 1f);
                    return(false);
                }
            }
            return(true);
        }
示例#2
0
 internal FirePillarElement(ParticleElement element) : base(element)
 {
 }
示例#3
0
 internal SparksElement(ParticleElement element) : base(element)
 {
 }
示例#4
0
 internal DistortionElement(ParticleElement element) : base(element)
 {
 }
示例#5
0
 internal FlashElement(ParticleElement element) : base(element)
 {
 }
示例#6
0
 internal FireBallElement(ParticleElement element) : base(element)
 {
 }