Exemplo n.º 1
0
        // Token: 0x060032D9 RID: 13017 RVA: 0x000DC6DC File Offset: 0x000DA8DC
        public override void OnEnter()
        {
            base.OnEnter();
            Transform modelTransform = base.GetModelTransform();

            if (modelTransform && modelTransform.GetComponent <ChildLocator>() && DeathState.initialEffect)
            {
                EffectManager.SpawnEffect(DeathState.initialEffect, new EffectData
                {
                    origin = base.transform.position,
                    scale  = DeathState.initialEffectScale
                }, false);
            }
            if (modelTransform)
            {
                RagdollController component  = modelTransform.GetComponent <RagdollController>();
                Rigidbody         component2 = base.GetComponent <Rigidbody>();
                if (component && component2)
                {
                    component.BeginRagdoll(component2.velocity * DeathState.velocityMagnitude);
                }
            }
            ExplodeRigidbodiesOnStart component3 = modelTransform.GetComponent <ExplodeRigidbodiesOnStart>();

            if (component3)
            {
                component3.force   = DeathState.explosionForce;
                component3.enabled = true;
            }
        }
Exemplo n.º 2
0
        // Token: 0x060008DB RID: 2267 RVA: 0x0002CA80 File Offset: 0x0002AC80
        public override void OnExit()
        {
            base.OnExit();
            Util.PlaySound(DeathState.initialSoundString, base.gameObject);
            Transform modelTransform = base.GetModelTransform();

            if (modelTransform && NetworkServer.active && modelTransform.GetComponent <ChildLocator>() && DeathState.initialEffect)
            {
                EffectManager.instance.SpawnEffect(DeathState.initialEffect, new EffectData
                {
                    origin = base.transform.position,
                    scale  = DeathState.initialEffectScale
                }, true);
            }
            Rigidbody         component  = base.GetComponent <Rigidbody>();
            RagdollController component2 = modelTransform.GetComponent <RagdollController>();

            if (component2 && component)
            {
                component2.BeginRagdoll(component.velocity * DeathState.velocityMagnitude);
            }
            ExplodeRigidbodiesOnStart component3 = modelTransform.GetComponent <ExplodeRigidbodiesOnStart>();

            if (component3)
            {
                component3.force   = DeathState.explosionForce;
                component3.enabled = true;
            }
        }
        public override void OnExit()
        {
            if (NetworkServer.active && childLocator && VanillaMegaDroneState.initialEffect)
            {
                EffectManager.SpawnEffect(VanillaMegaDroneState.initialEffect, new EffectData
                {
                    origin = transform.position,
                    scale  = VanillaMegaDroneState.initialEffectScale
                }, true);
            }
            ExplodeRigidbodiesOnStart explodeComponent = modelTransform.GetComponent <ExplodeRigidbodiesOnStart>();

            if (explodeComponent)
            {
                explodeComponent.force   = VanillaMegaDroneState.explosionForce;
                explodeComponent.enabled = true;
            }
            base.OnExit();
        }
        // Token: 0x0600315C RID: 12636 RVA: 0x000D4788 File Offset: 0x000D2988
        public override void OnExit()
        {
            base.OnExit();
            Util.PlaySound(MegaDroneDeathState.initialSoundString, base.gameObject);
            Transform modelTransform = base.GetModelTransform();

            if (modelTransform && NetworkServer.active)
            {
                ChildLocator component = modelTransform.GetComponent <ChildLocator>();
                if (component)
                {
                    component.FindChild("LeftJet").gameObject.SetActive(false);
                    component.FindChild("RightJet").gameObject.SetActive(false);
                    if (MegaDroneDeathState.initialEffect)
                    {
                        EffectManager.SpawnEffect(MegaDroneDeathState.initialEffect, new EffectData
                        {
                            origin = base.transform.position,
                            scale  = MegaDroneDeathState.initialEffectScale
                        }, true);
                    }
                }
            }
            Rigidbody         component2 = base.GetComponent <Rigidbody>();
            RagdollController component3 = modelTransform.GetComponent <RagdollController>();

            if (component3 && component2)
            {
                component3.BeginRagdoll(component2.velocity * MegaDroneDeathState.velocityMagnitude);
            }
            ExplodeRigidbodiesOnStart component4 = modelTransform.GetComponent <ExplodeRigidbodiesOnStart>();

            if (component4)
            {
                component4.force   = MegaDroneDeathState.explosionForce;
                component4.enabled = true;
            }
        }