Exemple #1
0
        public override void OnEnter()
        {
            base.OnEnter();
            if (TTGL_SurvivorPlugin.rideMeExtendedInstalled)
            {
                TTGL_SurvivorPlugin.ExpulseAnyRider(base.gameObject);
            }
            this.cancelled = true;
            Util.PlaySound(BaseBeginArrowBarrage.blinkSoundString, base.gameObject);
            this.modelTransform = base.GetModelTransform();
            this.animator       = base.GetModelAnimator();
            if (this.modelTransform)
            {
                this.hurtboxGroup = this.modelTransform.GetComponent <HurtBoxGroup>();
            }
            this.prepDuration = this.basePrepDuration;
            base.PlayAnimation("FullBody, Override", "LagannImpact1");
            if (base.characterMotor)
            {
                base.characterMotor.velocity = Vector3.zero;
            }

            if (this.hurtboxGroup)
            {
                HurtBoxGroup hurtBoxGroup = this.hurtboxGroup;
                hurtBoxGroup.hurtBoxesDeactivatorCounter++;
            }
            if (this.isGrounded)
            {
                this.isJumping = true;
                base.SmallHop(base.characterMotor, this.jumpCoefficient);

                //this.CreateBlinkEffect(base.transform.position);
            }
        }
Exemple #2
0
        private static void CreateGurrenLagannSpecialProjectile()
        {
            gigaDrillProjectilePrefab = CloneProjectilePrefab("Sawmerang", "GurrenLagannSpecialProjectile");
            ProjectileController projectileController = gigaDrillProjectilePrefab.GetComponent <ProjectileController>();

            projectileController.ghostPrefab = shadesGhostPrefab;
            projectileController.startSound  = "";

            ProjectileOverlapAttack overlapAttack = gigaDrillProjectilePrefab.GetComponent <ProjectileOverlapAttack>();

            overlapAttack.damageCoefficient      = 1.0f;
            overlapAttack.overlapProcCoefficient = GurrenLagannInitGigaDrillBreak.procCoefficient;

            BoomerangProjectile          boomerangProjectile          = gigaDrillProjectilePrefab.GetComponent <BoomerangProjectile>();
            GurrenLagannShadesProjectile gurrenLagannShadesProjectile = gigaDrillProjectilePrefab.AddComponent <GurrenLagannShadesProjectile>();

            gurrenLagannShadesProjectile.canHitWorld     = true;
            gurrenLagannShadesProjectile.crosshairPrefab = boomerangProjectile.crosshairPrefab;
            gurrenLagannShadesProjectile.impactSpark     = boomerangProjectile.impactSpark;
            gurrenLagannShadesProjectile.canConstrict    = true;

            var collider = gigaDrillProjectilePrefab.GetComponent <BoxCollider>();

            collider.size = new Vector3(6.0f, 1.0f, 6.0f);

            var hitbox = gigaDrillProjectilePrefab.GetComponentInChildren <HitBox>();

            hitbox.transform.localScale = new Vector3(8.0f, 3.0f, 8.0f);

            TTGL_SurvivorPlugin.DestroyImmediate(boomerangProjectile);
        }
Exemple #3
0
 internal static void ClearSkillFamilies(GameObject targetPrefab)
 {
     foreach (GenericSkill obj in targetPrefab.GetComponentsInChildren <GenericSkill>())
     {
         TTGL_SurvivorPlugin.DestroyImmediate(obj);
     }
 }
Exemple #4
0
        protected virtual GameObject CreateModel(GameObject main, string modelName)
        {
            TTGL_SurvivorPlugin.DestroyImmediate(main.transform.Find("ModelBase").gameObject);
            TTGL_SurvivorPlugin.DestroyImmediate(main.transform.Find("CameraPivot").gameObject);
            TTGL_SurvivorPlugin.DestroyImmediate(main.transform.Find("AimOrigin").gameObject);

            return(Modules.Assets.LoadAsset <GameObject>(modelName));
        }
Exemple #5
0
        public override void OnEnter()
        {
            base.OnEnter();
            if (TTGL_SurvivorPlugin.rideMeExtendedInstalled)
            {
                TTGL_SurvivorPlugin.ExitSeat(base.gameObject);
            }
            if (NetworkServer.active)
            {
                base.characterBody.AddBuff(Buffs.HiddenInvincibility);
            }
            if (base.isAuthority)
            {
                m_TrajectoryNodeCount = TrajectoryNodes != null ? TrajectoryNodes.Length : 0;
                if (m_TrajectoryNodeCount > CurrentNodeIndex)
                {
                    var nextNode = TrajectoryNodes[CurrentNodeIndex];
                    m_CurrentTarget = nextNode.Item1;
                }
            }
            this.cancelled = true;
            Util.PlaySound(EvisDash.beginSoundString, base.gameObject);

            base.characterMotor.useGravity = false;
            var childLocator = base.GetModelChildLocator();

            this.rootTransform = childLocator.FindChild("LagganArmature");
            base.PlayCrossfade("FullBody, Override", "LagannImpact3", 0.2f);

            this.CreateBlinkEffect(Util.GetCorePosition(base.gameObject));

            HitBoxGroup hitBoxGroup    = null;
            Transform   modelTransform = base.GetModelTransform();

            if (modelTransform)
            {
                hitBoxGroup = Array.Find <HitBoxGroup>(modelTransform.GetComponents <HitBoxGroup>(), (HitBoxGroup element) => element.groupName == c_HitboxGroupName);
            }

            this.overlapAttack = new OverlapAttack
            {
                attacker         = base.gameObject,
                damage           = damageCoefficient * base.characterBody.damage,
                pushAwayForce    = this.pushForce,
                isCrit           = base.RollCrit(),
                damageColorIndex = DamageColorIndex.Default,
                inflictor        = base.gameObject,
                procChainMask    = default(ProcChainMask),
                procCoefficient  = procCoefficient,
                teamIndex        = base.characterBody.teamComponent.teamIndex,
                hitBoxGroup      = hitBoxGroup,
                hitEffectPrefab  = Modules.Assets.punchImpactEffect,
                impactSound      = Modules.Assets.drillRushHitSoundEvent.index,
            };
        }
Exemple #6
0
        public override void OnEnter()
        {
            base.OnEnter();
            if (TTGL_SurvivorPlugin.rideMeExtendedInstalled)
            {
                TTGL_SurvivorPlugin.ExpulseAnyRider(base.gameObject);
                TTGL_SurvivorPlugin.ExitSeat(base.gameObject);
            }
            this.animator = base.GetModelAnimator();
            if (base.isGrounded)
            {
                base.PlayCrossfade("FullBody, Override", "LagannBurrowerStrikeBurrow", this.playbackRateString, burrowingDuration, 0.2f);
                DisplayMound();
            }
            else
            {
                falling = true;
                fell    = true;
                base.PlayCrossfade("FullBody, Override", "LagannBurrowerStrikeFall", 0.2f);
                if (NetworkServer.active)
                {
                    base.characterBody.AddBuff(RoR2Content.Buffs.HiddenInvincibility);
                }
                if (base.isAuthority)
                {
                    base.characterMotor.onMovementHit += this.OnMovementHit;
                    base.characterMotor.velocity.y     = GroundSlam.initialVerticalVelocity;
                }
            }

            HitBoxGroup hitBoxGroup    = null;
            Transform   modelTransform = base.GetModelTransform();

            if (modelTransform)
            {
                hitBoxGroup = Array.Find <HitBoxGroup>(modelTransform.GetComponents <HitBoxGroup>(), (HitBoxGroup element) => element.groupName == "LagannImpactHitbox");
            }

            this.attack = new OverlapAttack
            {
                attacker         = base.gameObject,
                damage           = PrepareLagannBurrowerStrike.damageCoefficient * base.characterBody.damage,
                pushAwayForce    = 300f,
                isCrit           = base.RollCrit(),
                damageColorIndex = DamageColorIndex.Default,
                inflictor        = base.gameObject,
                procChainMask    = default(ProcChainMask),
                procCoefficient  = 1f,
                teamIndex        = base.characterBody.teamComponent.teamIndex,
                hitBoxGroup      = hitBoxGroup,
                hitEffectPrefab  = Modules.Assets.punchImpactEffect,
                impactSound      = Modules.Assets.drillRushHitSoundEvent.index,
            };
        }
        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);
            }
        }
Exemple #8
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);
        }
Exemple #9
0
 public override void OnEnter()
 {
     base.OnEnter();
     if (TTGL_SurvivorPlugin.rideMeExtendedInstalled)
     {
         TTGL_SurvivorPlugin.ExitSeat(base.gameObject);
     }
     this.duration      = LagannDrillSpike.baseDuration / this.attackSpeedStat;
     this.earlyExitTime = LagannDrillSpike.baseEarlyExitTime / this.attackSpeedStat;
     this.hasFired      = false;
     base.StartAimMode(0.5f + this.duration, false);
     if (base.isGrounded)
     {
         base.PlayCrossfade("FullBody, Override", "LagannDrillSpike" + (1 + swingIndex), this.playbackRateString, this.duration, 0.05f);
     }
     else
     {
         base.characterBody.bodyFlags |= CharacterBody.BodyFlags.IgnoreFallDamage;
         falling = true;
         fell    = true;
         //Slam Down Raycast
         RaycastHit raycastHit;
         if (Physics.Raycast(new Ray(base.transform.position, Vector3.down), out raycastHit, maxDistance, LayerIndex.world.mask, QueryTriggerInteraction.Ignore))
         {
             startingDistance = Vector3.Distance(base.transform.position, raycastHit.point);
         }
         else
         {
             startingDistance = maxDistance;
         }
         this.bonusMultiplier = 1f + ((startingDistance / maxDistance) * 10);
         base.PlayCrossfade("FullBody, Override", "LagannDrillSpikeFall", 0.2f);
         if (base.isAuthority)
         {
             base.characterMotor.onMovementHit += this.OnMovementHit;
             base.characterMotor.velocity.y     = GroundSlam.initialVerticalVelocity;
         }
         Util.PlaySound(GroundSlam.enterSoundString, base.gameObject);
         this.previousAirControl        = base.characterMotor.airControl;
         base.characterMotor.airControl = GroundSlam.airControl;
         this.leftFistEffectInstance    = UnityEngine.Object.Instantiate <GameObject>(GroundSlam.fistEffectPrefab, base.FindModelChild("RightHandDrill"));
         this.rightFistEffectInstance   = UnityEngine.Object.Instantiate <GameObject>(GroundSlam.fistEffectPrefab, base.FindModelChild("LeftHandDrill"));
     }
 }
        public override void OnEnter()
        {
            base.OnEnter();
            Util.PlaySound(BaseBeginArrowBarrage.blinkSoundString, base.gameObject);

            if (NetworkServer.active)
            {
                if (this.HasBuff(Modules.Buffs.canopyBuff))
                {
                    base.characterBody.RemoveBuff(Modules.Buffs.canopyBuff);
                }
                else
                {
                    if (TTGL_SurvivorPlugin.rideMeExtendedInstalled)
                    {
                        TTGL_SurvivorPlugin.ExpulseAnyRider(base.gameObject);
                    }
                    base.characterBody.AddBuff(Modules.Buffs.canopyBuff);
                }
            }
        }
Exemple #11
0
 private void SceneManager_sceneLoaded(Scene arg0, LoadSceneMode arg1)
 {
     if (arg0.name == "intro")
     {
         GameObject.Find("CutsceneController").GetComponentInChildren <StartEvent>().action.RemoveAllListeners();
         TTGL_SurvivorPlugin.DestroyImmediate(GameObject.Find("Set 2 - Cabin"));
         TTGL_SurvivorPlugin.DestroyImmediate(GameObject.Find("Set 4 - Cargo"));
         TTGL_SurvivorPlugin.DestroyImmediate(GameObject.Find("Set 1 - Space"));
         TTGL_SurvivorPlugin.DestroyImmediate(GameObject.Find("Set 3 - Space, Small Planet"));
         TTGL_SurvivorPlugin.DestroyImmediate(GameObject.Find("cutscene intro"));
         TTGL_SurvivorPlugin.DestroyImmediate(GameObject.Find("MainArea"));
         //TTGL_SurvivorPlugin.DestroyImmediate(GameObject.Find("Cutscene Space Skybox"));
         //TTGL_SurvivorPlugin.DestroyImmediate(GameObject.Find("GlobalPostProcessVolume"));
         //TTGL_SurvivorPlugin.DestroyImmediate(GameObject.Find("Scene Camera").GetComponent<BlurOptimized>());
         //TTGL_SurvivorPlugin.DestroyImmediate(GameObject.Find("Scene Camera").GetComponent<TranslucentImageSource>());
         //TTGL_SurvivorPlugin.DestroyImmediate(GameObject.Find("Scene Camera").GetComponent<PostProcessLayer>());
         var sceneCamera      = GameObject.Find("Scene Camera");
         var scenaMatchCamera = sceneCamera.GetComponent <MatchCamera>();
         var introRoot        = Addressables.InstantiateAsync("TTGL_intro_root").WaitForCompletion();
         scenaMatchCamera.srcCamera = GameObject.Find("Main Camera").GetComponent <Camera>();
     }
 }
        public override void OnEnter()
        {
            base.OnEnter();
            if (TTGL_SurvivorPlugin.rideMeExtendedInstalled)
            {
                TTGL_SurvivorPlugin.ExitSeat(base.gameObject);
            }
            this.animator           = base.GetModelAnimator();
            this.playbackRateString = "SpiralBurst.playbackRate";

            if (base.isAuthority && base.inputBank)
            {
                this.burstDirection = ((base.inputBank.moveVector == Vector3.zero) ? Vector3.up : base.inputBank.moveVector).normalized;
            }
            bool isVertical = (this.burstDirection == Vector3.up);

            this.duration = (isVertical) ? LagannSpiralBurst.vertical_duration : LagannSpiralBurst.horizontal_duration;
            this.RecalculateBurstSpeed(isVertical);

            this.damageType        = DamageType.BypassArmor;
            this.pushForce         = 500f;
            this.bonusForce        = Vector3.zero;
            this.attackStartTime   = 0.1f;
            this.attackEndTime     = 0.9f;
            this.baseEarlyExitTime = 0.3f;
            this.hitStopDuration   = 0.115f;
            this.attackRecoil      = 0.75f;

            HitBoxGroup hitBoxGroup    = null;
            Transform   modelTransform = base.GetModelTransform();

            if (modelTransform)
            {
                var hitBoxGroupName = isVertical ? LagannSpiralBurst.verticalBurstHitboxName : LagannSpiralBurst.horizontalBurstHitboxName;
                hitBoxGroup = Array.Find <HitBoxGroup>(modelTransform.GetComponents <HitBoxGroup>(), (HitBoxGroup element) => element.groupName == hitBoxGroupName);
            }

            this.attack                 = new OverlapAttack();
            this.attack.damageType      = this.damageType;
            this.attack.attacker        = base.gameObject;
            this.attack.inflictor       = base.gameObject;
            this.attack.teamIndex       = base.GetTeam();
            this.attack.damage          = LagannSpiralBurst.damageCoefficient * this.damageStat;
            this.attack.procCoefficient = procCoefficient;
            this.attack.hitEffectPrefab = this.hitEffectPrefab;
            this.attack.forceVector     = this.bonusForce;
            this.attack.pushAwayForce   = this.pushForce;
            this.attack.hitBoxGroup     = hitBoxGroup;
            this.attack.isCrit          = base.RollCrit();
            //this.attack.impactSound = Modules.Assets.drillRushHitSoundEvent.index;

            if (base.characterMotor)
            {
                if (isVertical)
                {
                    base.SmallHop(base.characterMotor, this.burstSpeed);
                }
                else
                {
                    base.characterMotor.velocity.y = 0f;
                    base.characterMotor.velocity   = this.burstDirection * this.burstSpeed;
                }
            }

            Vector3 b = base.characterMotor ? base.characterMotor.velocity : Vector3.zero;

            this.previousPosition = base.transform.position - b;

            base.PlayAnimation("FullBody, Override", (isVertical) ? "SpiralBurst2": "SpiralBurst1", this.playbackRateString, this.duration);
            Util.PlaySound(SlideState.soundString, base.gameObject);
            if (NetworkServer.active)
            {
                base.characterBody.AddBuff(Buffs.HiddenInvincibility);
            }
        }