コード例 #1
0
 // Token: 0x060026B7 RID: 9911 RVA: 0x000DC628 File Offset: 0x000DA828
 public void RecoilByDirection(int attackDirection, float attackMagnitude)
 {
     if (this.state != Recoiler.States.Ready)
     {
         return;
     }
     if (this.freezeInPlace)
     {
         this.Freeze();
         return;
     }
     if (attackDirection == 1 && this.preventRecoilUp)
     {
         return;
     }
     if (this.bodyCollider == null)
     {
         this.bodyCollider = base.GetComponent <Collider2D>();
     }
     this.state               = Recoiler.States.Recoiling;
     this.recoilSpeed         = this.recoilSpeedBase * attackMagnitude;
     this.recoilTimeRemaining = this.recoilDuration;
     recoilDirection          = DirectionToVector(attackDirection);
     this.UpdatePhysics(0f);
 }
コード例 #2
0
 // Token: 0x060026B8 RID: 9912 RVA: 0x000DC748 File Offset: 0x000DA948
 public void CancelRecoil()
 {
     if (this.state != Recoiler.States.Ready)
     {
         this.state = Recoiler.States.Ready;
         if (this.OnCancelRecoil != null)
         {
             this.OnCancelRecoil();
         }
     }
 }
コード例 #3
0
 // Token: 0x060026B9 RID: 9913 RVA: 0x000DC76C File Offset: 0x000DA96C
 private void Freeze()
 {
     if (this.skipFreezingByController)
     {
         if (this.OnHandleFreeze != null)
         {
             this.OnHandleFreeze();
         }
         this.state = Recoiler.States.Ready;
         return;
     }
     this.state = Recoiler.States.Frozen;
     if (this.body != null)
     {
         this.body.velocity = Vector2.zero;
     }
     this.recoilTimeRemaining = this.recoilDuration;
     this.UpdatePhysics(0f);
 }