Exemplo n.º 1
0
        public override void OnEffectRemoved(GameActor actor, RuntimeGameActorEffectData effectData)
        {
            var hand = actor.transform.Find("DemonVFX").gameObject;

            UnityEngine.Object.Destroy(hand);
            actor.DeregisterOverrideColor(vfxNamedemon);
            base.OnEffectRemoved(actor, effectData);
        }
Exemplo n.º 2
0
        public override void OnEffectRemoved(GameActor actor, RuntimeGameActorEffectData effectData)
        {
            var hand = actor.transform.Find("money22VFX").gameObject;

            UnityEngine.Object.Destroy(hand);

            actor.DeregisterOverrideColor(vfxNamemoney2);
            base.OnEffectRemoved(actor, effectData);
            actor.healthHaver.AllDamageMultiplier -= -0.3f;
        }
Exemplo n.º 3
0
        // Token: 0x06004CAA RID: 19626 RVA: 0x00199814 File Offset: 0x00197A14
        public override void OnEffectRemoved(GameActor actor, RuntimeGameActorEffectData effectData)
        {
            if (actor.IsFrozen)
            {
                actor.FreezeAmount = 0f;
                float resistanceForEffectType = actor.GetResistanceForEffectType(this.resistanceType);
                float damage = Mathf.Max(0f, actor.healthHaver.GetMaxHealth() * this.UnfreezeDamagePercent * (1f - resistanceForEffectType));
                actor.healthHaver.ApplyDamage(damage, Vector2.zero, "Freezer Burn", CoreDamageTypes.Ice, DamageCategory.DamageOverTime, true, null, false);
                this.DestroyCrystals(effectData, !actor.healthHaver.IsDead);
                if (this.AppliesTint)
                {
                    actor.DeregisterOverrideColor(this.effectIdentifier);
                }
                if (actor.behaviorSpeculator)
                {
                    actor.behaviorSpeculator.enabled = true;
                }
                if (this.ShouldVanishOnDeath(actor))
                {
                    actor.StealthDeath = false;
                }
                actor.IsFrozen = false;
            }
            actor.MovementModifiers      -= effectData.MovementModifier;
            actor.healthHaver.OnPreDeath -= effectData.OnActorPreDeath;
            if (actor.aiAnimator)
            {
                actor.aiAnimator.FpsScale = 1f;
            }
            if (actor.aiShooter)
            {
                actor.aiShooter.AimTimeScale = 1f;
            }
            if (actor.behaviorSpeculator)
            {
                actor.behaviorSpeculator.CooldownScale = 1f;
            }
            if (actor.bulletBank)
            {
                actor.bulletBank.TimeScale = 1f;
            }
            tk2dSpriteAnimator spriteAnimator = actor.spriteAnimator;

            if (spriteAnimator && actor.aiAnimator && spriteAnimator.CurrentClip != null && !spriteAnimator.IsPlaying(spriteAnimator.CurrentClip))
            {
                actor.aiAnimator.PlayUntilFinished(actor.spriteAnimator.CurrentClip.name, false, null, -1f, true);
            }
        }