コード例 #1
0
 public void PlayerFightPunchAttackEnd(FistFightController.Mode mode)
 {
     if (this.m_CurrentPhase == FistFightController.m_FightLeftPunchValue)
     {
         this.m_CurrentPhase = FistFightController.m_FightRightPunchValue;
     }
     else if (this.m_CurrentPhase == FistFightController.m_FightRightPunchValue)
     {
         this.m_CurrentPhase = FistFightController.m_FightLeftPunchValue;
     }
     this.m_Time = 0f;
     this.m_LeftHandCollider.enabled  = false;
     this.m_RightHandCollider.enabled = false;
     PlayerConditionModule.Get().DecreaseStamina(StaminaDecreaseReason.Attack, this.GetStaminaConsumptionMul(mode));
     if (this.m_ClickBuffer > 0 && this.CanAttack())
     {
         this.Attack((this.m_ClickBuffer == 1) ? FistFightController.Mode.Normal : FistFightController.Mode.Hard);
     }
     else
     {
         this.SetAttackParam(FistFightController.m_FightIdleValue);
     }
     this.m_ClickBuffer   = 0;
     this.m_ActionAllowed = true;
 }
コード例 #2
0
 private float GetStaminaConsumptionMul(FistFightController.Mode mode)
 {
     if (mode == FistFightController.Mode.Cancelled)
     {
         return(0f);
     }
     if (mode == FistFightController.Mode.Normal)
     {
         return(this.m_StaminaNormal);
     }
     return(this.m_StaminaHard);
 }
コード例 #3
0
 private void Attack(FistFightController.Mode mode)
 {
     this.m_CurrentMode = mode;
     this.Attack();
 }