Ejemplo n.º 1
0
 private static void PlayMuzzleEffect(FireLunarNeedle self, string targetMuzzle)
 {
     if (FireLunarNeedle.muzzleFlashEffectPrefab)
     {
         EffectManager.SimpleMuzzleFlash(FireLunarNeedle.muzzleFlashEffectPrefab, self.gameObject, targetMuzzle, false);
     }
 }
Ejemplo n.º 2
0
 private static void OnEnter_Huntress(FireLunarNeedle self)
 {
     self.PlayAnimation("Gesture, Additive", "FireArrow", "FireArrow.playbackRate", self.duration * 2f);
     self.PlayAnimation("Gesture, Override", "FireArrow", "FireArrow.playbackRate", self.duration * 2f);
     //self.PlayAnimation("Body", "FireArrowSnipe", "FireArrowSnipe.playbackRate", self.duration);
     FireNeedle(self, "Muzzle");
 }
Ejemplo n.º 3
0
        private static void OnEnter_Mage(FireLunarNeedle self)
        {
            var stepper = self.characterBody.GetComponent <Class1.HeresyStepperTracker>();

            //stepper.stepperMage = !stepper.stepperMage;
            if (stepper.Step())
            {
                if (self.attackSpeedStat < EntityStates.Mage.Weapon.FireFireBolt.attackSpeedAltAnimationThreshold)
                {
                    self.PlayCrossfade("Gesture, Additive", "Cast1Right", "FireGauntlet.playbackRate", self.duration, 0.1f);
                    self.PlayAnimation("Gesture Left, Additive", "Empty");
                    self.PlayAnimation("Gesture Right, Additive", "Empty");
                    return;
                }
                self.PlayAnimation("Gesture Right, Additive", "FireGauntletRight", "FireGauntlet.playbackRate", self.duration);
                self.PlayAnimation("Gesture, Additive", "HoldGauntletsUp", "FireGauntlet.playbackRate", self.duration);
                FireNeedle(self, "MuzzleRight");
                return;
            }
            else
            {
                if (self.attackSpeedStat < EntityStates.Mage.Weapon.FireFireBolt.attackSpeedAltAnimationThreshold)
                {
                    self.PlayCrossfade("Gesture, Additive", "Cast1Left", "FireGauntlet.playbackRate", self.duration, 0.1f);
                    self.PlayAnimation("Gesture Left, Additive", "Empty");
                    self.PlayAnimation("Gesture Right, Additive", "Empty");
                    return;
                }
                self.PlayAnimation("Gesture Left, Additive", "FireGauntletLeft", "FireGauntlet.playbackRate", self.duration);
                self.PlayAnimation("Gesture, Additive", "HoldGauntletsUp", "FireGauntlet.playbackRate", self.duration);
                FireNeedle(self, "MuzzleLeft");
                return;
            }
        }
Ejemplo n.º 4
0
 private static void OnEnter_Bandit2(FireLunarNeedle self)
 {
     self.PlayAnimation("Gesture, Additive", "FireMainWeapon", self.playbackRateParam, self.duration);
     //self.PlayAnimation("Gesture, Additive", (self.characterBody.isSprinting && self.characterMotor && self.characterMotor.isGrounded) ? "ReloadSimple" : "Reload", "Reload.playbackRate", self.duration);
     //self.PlayAnimation("Gesture, Additive", "FireSideWeapon", "FireSideWeapon.playbackRate", self.duration);
     //self.PlayAnimation("Gesture, Additive", "MainToSide", "MainToSide.playbackRate", self.duration);
     FireNeedle(self, "MuzzleShotgun");
 }
Ejemplo n.º 5
0
 private static void OnEnter_Captain(FireLunarNeedle self)
 {
     //self.PlayAnimation("Gesture, Additive", "FireCaptainShotgun");
     //self.PlayAnimation("Gesture, Override", "FireCaptainShotgun");
     self.PlayCrossfade("Gesture, Override", "ChargeCaptainShotgun", "ChargeCaptainShotgun.playbackRate", self.duration, 0.1f);
     self.PlayCrossfade("Gesture, Additive", "ChargeCaptainShotgun", "ChargeCaptainShotgun.playbackRate", self.duration, 0.1f);
     FireNeedle(self, EntityStates.Captain.Weapon.FireTazer.targetMuzzle);
 }
Ejemplo n.º 6
0
 private static void OnEnter_Loader(FireLunarNeedle self)
 {
     //var stepper = self.characterBody.GetComponent<Class1.HeresyStepperTracker>();
     //stepper.stepperLoader = !stepper.stepperLoader;
     //string animationStateName = (stepper.Step()) ? "SwingFistRight" : "SwingFistLeft";
     //self.PlayCrossfade("Gesture, Additive", animationStateName, "SwingFist.playbackRate", self.duration, 0.1f);
     //self.PlayCrossfade("Gesture, Override", animationStateName, "SwingFist.playbackRate", self.duration, 0.1f);
     self.PlayCrossfade("FullBody, Override", "ChargePunch", "ChargePunch.playbackRate", self.duration, 0.1f);
     FireNeedle(self, "Head"); //todo find good muzzle
 }
Ejemplo n.º 7
0
        private static void OnEnter_Engi(FireLunarNeedle self)
        {
            var stepper = self.characterBody.GetComponent <Class1.HeresyStepperTracker>();

            if (stepper.Step())
            {
                self.PlayCrossfade("Gesture Left Cannon, Additive", "FireGrenadeLeft", 0.1f);
                FireNeedle(self, "MuzzleLeft");
            }
            else
            {
                self.PlayCrossfade("Gesture Right Cannon, Additive", "FireGrenadeRight", 0.1f);
                FireNeedle(self, "MuzzleRight");
            }
        }
Ejemplo n.º 8
0
        private static void OnEnter_Commando(FireLunarNeedle self)
        {
            var stepper = self.characterBody.GetComponent <Class1.HeresyStepperTracker>();

            if (stepper.Step())
            {
                self.PlayAnimation("Gesture Additive, Left", "FirePistol, Left", self.playbackRateParam, self.duration);
                FireNeedle(self, "MuzzleLeft");
            }
            else
            {
                self.PlayAnimation("Gesture Additive, Right", "FirePistol, Right", self.playbackRateParam, self.duration);
                FireNeedle(self, "MuzzleRight");
            }
            //self.PlayAnimation(self.animationLayerName, self.animationStateName, self.playbackRateParam, self.duration);
            //Gesture, Override FireLunarNeedle FireLunarNeedle.playbackRate 0.11
        }
Ejemplo n.º 9
0
        private static void OnEnter_Merc(FireLunarNeedle self)
        {
            Animator modelAnimator = self.GetModelAnimator();

            if (modelAnimator)
            {
                bool @bool = modelAnimator.GetBool("isMoving");
                bool bool2 = modelAnimator.GetBool("isGrounded");
                if (@bool || !bool2)
                {
                    self.PlayAnimation("Gesture, Additive", "GroundLight3", "GroundLight.playbackRate", self.duration);
                    self.PlayAnimation("Gesture, Override", "GroundLight3", "GroundLight.playbackRate", self.duration);
                }
                else
                {
                    self.PlayAnimation("FullBody, Override", "GroundLight3", "GroundLight.playbackRate", self.duration);
                }
            }
            FireNeedle(self, "Head");
        }
Ejemplo n.º 10
0
 private static void FireNeedle(FireLunarNeedle self, string targetMuzzle)
 {
     Util.PlaySound(FireLunarNeedle.fireSound, self.gameObject);
     PlayMuzzleEffect(self, targetMuzzle);
     if (self.isAuthority)
     {
         Ray aimRay = self.GetAimRay();
         aimRay.direction = Util.ApplySpread(aimRay.direction, 0f, FireLunarNeedle.maxSpread, 1f, 1f, 0f, 0f);
         FireProjectileInfo fireProjectileInfo = default;
         fireProjectileInfo.position         = aimRay.origin;
         fireProjectileInfo.rotation         = Quaternion.LookRotation(aimRay.direction);
         fireProjectileInfo.crit             = self.characterBody.RollCrit();
         fireProjectileInfo.damage           = self.characterBody.damage * FireLunarNeedle.damageCoefficient;
         fireProjectileInfo.damageColorIndex = DamageColorIndex.Default;
         fireProjectileInfo.owner            = self.gameObject;
         fireProjectileInfo.procChainMask    = default;
         fireProjectileInfo.force            = 0f;
         fireProjectileInfo.useFuseOverride  = false;
         fireProjectileInfo.useSpeedOverride = false;
         fireProjectileInfo.target           = null;
         fireProjectileInfo.projectilePrefab = FireLunarNeedle.projectilePrefab;
         ProjectileManager.instance.FireProjectile(fireProjectileInfo);
     }
 }
Ejemplo n.º 11
0
 private static void OnEnter_Tree(FireLunarNeedle self)
 {
     self.PlayAnimation("Gesture, Additive", "FireSyringe");
     FireNeedle(self, EntityStates.Treebot.Weapon.FireSyringe.muzzleName);
 }
Ejemplo n.º 12
0
 private static void OnEnter_Tool(FireLunarNeedle self)
 {
     self.PlayAnimation("Gesture, Additive", "FireNailgun");
     self.GetModelAnimator().SetBool("isFiringNailgun", true);
     FireNeedle(self, EntityStates.Toolbot.BaseNailgunState.muzzleName);
 }
Ejemplo n.º 13
0
 private static void OnEnter_Croco(FireLunarNeedle self)
 {
     self.PlayAnimation("Gesture, Mouth", "FireSpit", "FireSpit.playbackRate", self.duration);
     FireNeedle(self, "MouthMuzzle");
 }
Ejemplo n.º 14
0
 private static void OnEnter_Heretic(FireLunarNeedle self)
 {
 }