// Token: 0x06000567 RID: 1383 RVA: 0x00018648 File Offset: 0x00016848
        public override void OnEnter()
        {
            base.OnEnter();
            this.stopwatch            = 0f;
            this.entryDuration        = Flamethrower.baseEntryDuration / this.attackSpeedStat;
            this.flamethrowerDuration = Flamethrower.baseFlamethrowerDuration;
            Transform modelTransform         = base.GetModelTransform();
            MageLastElementTracker component = base.GetComponent <MageLastElementTracker>();

            if (component)
            {
                component.ApplyElement(MageElement.Fire);
            }
            if (base.characterBody)
            {
                base.characterBody.SetAimTimer(this.entryDuration + this.flamethrowerDuration + 1f);
            }
            if (modelTransform)
            {
                this.childLocator         = modelTransform.GetComponent <ChildLocator>();
                this.leftMuzzleTransform  = this.childLocator.FindChild("MuzzleLeft");
                this.rightMuzzleTransform = this.childLocator.FindChild("MuzzleRight");
            }
            float num = this.flamethrowerDuration * Flamethrower.tickFrequency;

            this.tickDamageCoefficient = Flamethrower.totalDamageCoefficient / num;
            if (base.isAuthority && base.characterBody)
            {
                this.isCrit = Util.CheckRoll(this.critStat, base.characterBody.master);
            }
            base.PlayAnimation("Gesture, Additive", "PrepFlamethrower", "Flamethrower.playbackRate", this.entryDuration);
        }
Example #2
0
        // Token: 0x06000575 RID: 1397 RVA: 0x00018CB8 File Offset: 0x00016EB8
        public override void OnEnter()
        {
            base.OnEnter();
            this.duration = PrepWall.baseDuration / this.attackSpeedStat;
            base.characterBody.SetAimTimer(this.duration + 2f);
            this.cachedCrosshairPrefab = base.characterBody.crosshairPrefab;
            base.PlayAnimation("Gesture, Additive", "PrepWall", "PrepWall.playbackRate", this.duration);
            Util.PlaySound(PrepWall.prepWallSoundString, base.gameObject);
            this.areaIndicatorInstance = UnityEngine.Object.Instantiate <GameObject>(PrepWall.areaIndicatorPrefab);
            MageLastElementTracker component = base.GetComponent <MageLastElementTracker>();

            if (component)
            {
                component.ApplyElement(MageElement.Ice);
            }
            this.UpdateAreaIndicator();
        }
        // Token: 0x0600053D RID: 1341 RVA: 0x00017460 File Offset: 0x00015660
        public override void OnEnter()
        {
            base.OnEnter();
            MageLastElementTracker component = base.GetComponent <MageLastElementTracker>();

            if (component)
            {
                component.ApplyElement(MageElement.Lightning);
            }
            this.stopwatch        = 0f;
            this.windDownDuration = ChargeNovabomb.baseWinddownDuration / this.attackSpeedStat;
            this.chargeDuration   = ChargeNovabomb.baseChargeDuration / this.attackSpeedStat;
            Util.PlayScaledSound(ChargeNovabomb.chargeSoundString, base.gameObject, this.attackSpeedStat);
            base.characterBody.SetAimTimer(this.chargeDuration + this.windDownDuration + 2f);
            this.muzzleString = "MuzzleBetween";
            this.animator     = base.GetModelAnimator();
            if (this.animator)
            {
                this.childLocator = this.animator.GetComponent <ChildLocator>();
            }
            if (this.childLocator)
            {
                this.muzzleTransform = this.childLocator.FindChild(this.muzzleString);
                if (this.muzzleTransform && ChargeNovabomb.chargeEffectPrefab)
                {
                    this.chargeEffectInstance = UnityEngine.Object.Instantiate <GameObject>(ChargeNovabomb.chargeEffectPrefab, this.muzzleTransform.position, this.muzzleTransform.rotation);
                    this.chargeEffectInstance.transform.parent = this.muzzleTransform;
                    ScaleParticleSystemDuration component2 = this.chargeEffectInstance.GetComponent <ScaleParticleSystemDuration>();
                    ObjectScaleCurve            component3 = this.chargeEffectInstance.GetComponent <ObjectScaleCurve>();
                    if (component2)
                    {
                        component2.newDuration = this.chargeDuration;
                    }
                    if (component3)
                    {
                        component3.timeMax = this.chargeDuration;
                    }
                }
            }
            base.PlayAnimation("Gesture, Additive", "ChargeNovaBomb", "ChargeNovaBomb.playbackRate", this.chargeDuration);
            this.defaultCrosshairPrefab = base.characterBody.crosshairPrefab;
            if (ChargeNovabomb.crosshairOverridePrefab)
            {
                base.characterBody.crosshairPrefab = ChargeNovabomb.crosshairOverridePrefab;
            }
        }