Example #1
0
        public override void OnEnter()
        {
            base.OnEnter();
            this.crocoDamageTypeController = base.GetComponent <CrocoDamageTypeController>();
            this.previousAirControl        = base.characterMotor.airControl;
            base.characterMotor.airControl = BaseLeap.airControl;
            Vector3 direction = base.GetAimRay().direction;

            if (base.isAuthority)
            {
                base.characterBody.isSprinting = true;
                direction.y = Mathf.Max(direction.y, BaseLeap.minimumY);
                Vector3 a  = direction.normalized * BaseLeap.aimVelocity * this.moveSpeedStat;
                Vector3 b  = Vector3.up * BaseLeap.upwardVelocity;
                Vector3 b2 = new Vector3(direction.x, 0f, direction.z).normalized *BaseLeap.forwardVelocity;
                base.characterMotor.Motor.ForceUnground();
                base.characterMotor.velocity = a + b + b2;
                this.isCritAuthority         = base.RollCrit();
            }
            base.characterBody.bodyFlags |= CharacterBody.BodyFlags.IgnoreFallDamage;
            base.GetModelTransform().GetComponent <AimAnimator>().enabled = true;
            base.PlayCrossfade("Gesture, Override", "Leap", 0.1f);
            base.PlayCrossfade("Gesture, AdditiveHigh", "Leap", 0.1f);
            base.PlayCrossfade("Gesture, Override", "Leap", 0.1f);
            Util.PlaySound(BaseLeap.leapSoundString, base.gameObject);
            base.characterDirection.moveVector = direction;
            if (base.isAuthority)
            {
                base.characterMotor.onMovementHit += this.OnMovementHit;
            }
            Util.PlaySound(BaseLeap.soundLoopStartEvent, base.gameObject);
        }
Example #2
0
 // Token: 0x06004458 RID: 17496 RVA: 0x001138FC File Offset: 0x00111AFC
 public override void OnEnter()
 {
     base.OnEnter();
     base.characterDirection.forward  = base.GetAimRay().direction;
     this.durationBeforeInterruptable = Bite.baseDurationBeforeInterruptable / this.attackSpeedStat;
     this.crocoDamageTypeController   = base.GetComponent <CrocoDamageTypeController>();
 }
Example #3
0
 private static DamageType CrocoDamageTypeController_GetDamageType(On.RoR2.CrocoDamageTypeController.orig_GetDamageType orig, CrocoDamageTypeController self)
 {
     if (self.passiveSkillSlot)
     {
         if (self.passiveSkillSlot.skillDef == self.poisonSkillDef)
         {
             return((DamageType)OriginalPoisonOnHit);
         }
     }
     return(orig(self));
 }