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; }
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); }
private void Attack(FistFightController.Mode mode) { this.m_CurrentMode = mode; this.Attack(); }