public override void OnEnter()
        {
            base.OnEnter();
            if (TTGL_SurvivorPlugin.rideMeExtendedInstalled)
            {
                TTGL_SurvivorPlugin.ExpulseAnyRider(base.gameObject);
            }
            this.fired              = false;
            this.animator           = base.GetModelAnimator();
            this.explosionIndex     = 0;
            duration                = 22.5f;
            durationBeforeExplosion = 16f;
            var gurrenLagannController = base.characterBody.GetComponent <GurrenLagannController>();

            if (gurrenLagannController && gurrenLagannController.gigaDrillBreakTarget)
            {
                gigaDrillBreakTarget = gurrenLagannController.gigaDrillBreakTarget.GetComponent <CharacterBody>();
                ConstrictBoss(gigaDrillBreakTarget);
            }
            base.PlayAnimation("FullBody, Override", "GurrenLagannGigaDrillBreak", "skill4.playbackRate", this.duration);
            if (CameraRigController.IsObjectSpectatedByAnyCamera(base.gameObject))
            {
                this.currentSound = Util.PlaySound(GurrenLagannGigaDrillBreak.soundString, base.gameObject);
            }
            AllowOutOfBound(true);
            this.SetAntiGravity(base.characterBody, true);
            this.previousPosition    = base.characterMotor.Motor.transform.position;
            this.specialMovePosition = this.previousPosition + new Vector3(50000f, 0, 0f);
            this.SetPosition(base.gameObject, this.specialMovePosition);
            if (gigaDrillBreakTarget)
            {
                var targetDirection = (gigaDrillBreakTarget.transform.position - base.characterDirection.targetTransform.position).normalized;
                base.characterDirection.forward = targetDirection;
                this.SetAntiGravity(gigaDrillBreakTarget, true);
                this.previousTargetPosition = gigaDrillBreakTarget.transform.position;
                this.SetPosition(gigaDrillBreakTarget.gameObject, gigaDrillBreakTarget.transform.position + new Vector3(50000f, 0f, 0f));
            }
            var childSelector = base.GetModelChildLocator();

            if (childSelector)
            {
                this.specialMoveTargetPosition = childSelector.FindChild("SpecialMoveTargetPosition");
                this.specialMoveCameraSource   = childSelector.FindChild("SpecialMoveCameraSource");
                this.forcedCamera = specialMoveCameraSource.GetComponent <SkippableCamera>();
            }
            UpdateCameraOverride();
            if (NetworkServer.active)
            {
                base.characterBody.AddBuff(RoR2.RoR2Content.Buffs.HiddenInvincibility);
            }
        }
Ejemplo n.º 2
0
        public override void OnEnter()
        {
            base.OnEnter();
            if (TTGL_SurvivorPlugin.rideMeExtendedInstalled)
            {
                TTGL_SurvivorPlugin.ExitSeat(base.gameObject);
                TTGL_SurvivorPlugin.ExpulseAnyRider(base.gameObject);
            }
            this.cinematicFrequence = Modules.Config.ttglShowCombiningAnimation;
            if (DisplayCinematic())
            {
                base.PlayAnimation("FullBody, Override", "TTGLSurvivorCombine", "Combine.playbackRate", LagannCombine.baseDuration);
                AllowOutOfBound(true);
                this.SetAntiGravity(base.characterBody, true);
                this.previousPosition  = base.characterMotor.Motor.transform.position;
                this.animationPosition = this.previousPosition + new Vector3(50000f, 0, 0f);
                this.SetPosition(base.gameObject, this.animationPosition);
                if (CameraRigController.IsObjectSpectatedByAnyCamera(base.gameObject))
                {
                    combineSoundRef = Util.PlaySound(LagannCombine.soundString, base.gameObject);
                }
                var childSelector = base.GetModelChildLocator();
                if (childSelector)
                {
                    this.specialMoveCameraSource = childSelector.FindChild("SpecialMoveCameraSource");
                    this.forcedCamera            = specialMoveCameraSource.GetComponent <SkippableCamera>();
                }
                UpdateCameraOverride();
                if (NetworkServer.active)
                {
                    base.characterBody.AddBuff(RoR2.RoR2Content.Buffs.HiddenInvincibility);
                }
            }
            else
            {
                Util.PlaySound(BaseBeginArrowBarrage.blinkSoundString, base.gameObject);
            }
            var spiralEnergyComponent = base.characterBody.GetComponent <SpiralEnergyComponent>();

            this.energy = spiralEnergyComponent.NetworkEnergy;
            var ttglMusicRemote = base.characterBody.GetComponent <TTGLMusicRemote>();

            ttglMusicRemote.PlayMusic(TTGLMusicController.MusicType.Combine);
        }