Example #1
0
            public override void OnEnter()
            {
                base.OnEnter();

                Transform modelTrans = base.GetModelTransform();

                this.passive    = base.gameObject.GetComponent <WispPassiveController>();
                this.orbControl = base.gameObject.GetComponent <ClientOrbController>();

                //Boolean hasStock = base.skillLocator.primary.stock > 0;
                //base.skillLocator.primary.stock = hasStock ? base.skillLocator.primary.stock - 1 : 0;
                //base.skillLocator.primary.rechargeStopwatch = 0f;

                //Single effectiveAttackSpeed = base.attackSpeedStat * ( hasStock ? 1.0f : noStockSpeedMult );
                Single effectiveAttackSpeed = base.attackSpeedStat;

                this.duration    = baseDuration / effectiveAttackSpeed;
                this.fireDelay   = this.duration * fireStartFrac;
                this.damageValue = base.damageStat * damageMult;

                this.anim = base.GetModelAnimator();
                String animStr = this.state != Direction.Right ? "Throw2" : "Throw1";

                base.PlayCrossfade("Gesture", animStr, "Throw.playbackRate", this.duration * 5f, 0.35f);
                RoR2.Util.PlaySound("Play_huntress_m2_throw", base.gameObject);

                base.characterBody.SetAimTimer(this.duration + 1f);
                base.characterBody.isSprinting = false;
                this.skin = base.characterBody.skinIndex;

                this.isDoppleganger = base.characterBody.inventory.GetItemCount(ItemIndex.InvadingDoppelganger) != 0;
            }
Example #2
0
            public override void OnEnter()
            {
                base.OnEnter();

                Main.instance.RW_BlockSprintCrosshair.Add(base.characterBody);

                this.armorBuff = Main.RW_armorBuff;
                this.passive   = this.gameObject.GetComponent <WispPassiveController>();
                this.skin      = this.characterBody.skinIndex;
                this.aimAnim   = this.GetComponent <WispAimAnimationController>();

                this.minDuration  = baseMinDuration / this.attackSpeedStat;
                this.fireInterval = 1f / baseTickFreq;

                RoR2.Util.PlayScaledSound("Play_titanboss_R_laser_loop", this.gameObject, 0.5f);

                this.muzzle = this.GetModelTransform().Find("CannonPivot").Find("BeamParent");

                this.beamEffect = UnityEngine.Object.Instantiate <GameObject>(Main.specialBeam, this.muzzle.position, this.muzzle.rotation);
                this.beamEffect.GetComponent <BitSkinController>().Apply(WispBitSkin.GetWispSkin(this.skin));
                this.beamEffect.transform.parent = this.muzzle;
                this.beamEnd = this.beamEffect.transform.Find("End");
                //this.beamEndSub = this.beamEnd.Find( "Sub" );
                //this.beamEndSub.gameObject.SetActive( false );
                //Create the charge and beam effects
                this.pos = Vector3.zero;

                this.team = TeamComponent.GetObjectTeam(this.gameObject);

                this.characterBody.AddBuff(this.armorBuff);

                this.cameraTargetParams.idealLocalCameraPos = this.camPos1;
                this.characterMotor.useGravity = false;
            }
Example #3
0
            public override void OnEnter()
            {
                base.OnEnter();

                this.passive = this.gameObject.GetComponent <WispPassiveController>();

                Transform modelTrans = base.GetModelTransform();

                //Sound

                this.duration = baseDuration / this.attackSpeedStat;

                //Animations

                if (modelTrans)
                {
                    this.childLoc = modelTrans.GetComponent <ChildLocator>();
                    this.anim     = modelTrans.GetComponent <Animator>();
                }

                if (this.anim)
                {
                    this.PlayCrossfade("Gesture", "ChargeBomb", "ChargeBomb.playbackRate", this.duration * fireDelay, 0.2f);
                }

                if (this.characterBody)
                {
                    this.characterBody.SetAimTimer(this.duration + 1f);
                }

                if (this.isAuthority)
                {
                    this.skin = this.characterBody.skinIndex;
                }
            }
Example #4
0
            //Orb params and stuff
            public override void OnEnter()
            {
                base.OnEnter();
                this.passive = this.gameObject.GetComponent <WispPassiveController>();
                this.flare   = this.GetComponent <WispFlareController>();
                this.skin    = this.characterBody.skinIndex;

                //blazeOrbRadius = baseBlazeOrbRadius;
                this.blazeOrbDuration           = baseBlazeOrbDuration;
                this.blazeOrbTickFreq           = baseBlazeOrbTickfreq;
                this.blazeOrbExpireStacksMult   = baseBlazeOrbExpireStacksMult;
                this.blazeOrbBuffDuration       = baseBlazeOrbBuffDuration;
                this.blazeOrbBonusBundlePercent = baseBlazeOrbBonusBundlePercent;

                this.igniteOrbStacksPerTick     = baseIgniteOrbStacksPerTick;
                this.igniteOrbDuration          = baseIgniteOrbDuration;
                this.igniteOrbProcCoef          = baseIgniteOrbProcCoef;
                this.igniteOrbTickDamage        = baseIgniteOrbTickDamage * this.damageStat;
                this.igniteOrbTickFreq          = baseIgniteOrbTickFreq;
                this.igniteOrbBaseStacksOnDeath = baseIgniteOrbBaseStacksOnDeath;
                this.igniteOrbDeathStacksMult   = baseIgniteOrbDeathStacksMult;
                this.igniteOrbExpireStacksMult  = baseIgniteOrbExpireStacksMult;
                //crit = RollCrit();

                this.flare.intensity = 1f;
            }
Example #5
0
        private void RW_Components()
        {
            MonoBehaviour.Destroy(this.RW_body.GetComponent <RigidbodyDirection>());
            MonoBehaviour.Destroy(this.RW_body.GetComponent <RigidbodyMotor>());
            MonoBehaviour.Destroy(this.RW_body.GetComponent <QuaternionPID>());
            MonoBehaviour.Destroy(this.RW_body.GetComponent <DeathRewards>());
            foreach (VectorPID c in this.RW_body.GetComponents <VectorPID>())
            {
                MonoBehaviour.Destroy(c);
            }
            MonoBehaviour.DestroyImmediate(this.RW_body.GetComponent <CapsuleCollider>());

            this.RW_body.AddComponent <CharacterMotor>();
            this.RW_body.AddComponent <CharacterDirection>();
            this.RW_body.AddComponent <KinematicCharacterController.KinematicCharacterMotor>();
            this.RW_body.AddComponent <SetStateOnHurt>();
            this.RW_body.AddComponent <WispFlareController>();
            this.RW_body.AddComponent <ClientOrbController>();
            this.RW_body.AddComponent <WispFlamesController>();

#if MATEDITOR
            this.RW_body.AddComponent <MaterialEditor>();
#endif

            WispPassiveController passive = this.RW_body.AddComponent <WispPassiveController>();
            this.RW_body.AddComponent <WispCrosshairManager>();
            this.RW_body.AddComponent <EntityStateMachine>().customName = "Gaze";

            this.RW_body.AddComponent <CollisionFixer>();
        }
Example #6
0
            public override void OnEnter()
            {
                base.OnEnter();
                this.passive = this.gameObject.GetComponent <WispPassiveController>();
                this.skin    = this.characterBody.skinIndex;

                WispPassiveController.ChargeState state = this.passive.UseCharge(FireGaze.chargeUsed, FireGaze.chargeScaler);
                this.radius *= state.chargeScaler;

                this.GetComponent <WispFlareController>().intensity = 0.5f;
            }