void TimeCombo() { if (activate_time) { current_time -= Time.deltaTime; if (current_time <= 0f) { activate_time = false; current_state_punch = ComboPunch.NONE; current_state_kick = ComboKick.NONE; } } }
void ResetAttack() { if (attackTimer_Reset) { currentTimer -= Time.deltaTime * resetPitch; if (currentTimer <= 0) { comboPunch = ComboPunch.NONE; currentTimer = defaultAttack_Timer; attackTimer_Reset = false; } } } // reset attack
void Start() { comboPunch = ComboPunch.NONE; currentTimer = defaultAttack_Timer; #region SPECIAL ATTACK COLOUR BUTTON // button color in the start of the game /* buttonColor.normalColor = Color.gray; * buttonColor.selectedColor = Color.gray; * buttonColor.highlightedColor = Color.gray; * buttonColor.pressedColor = Color.gray; * buttonColor.disabledColor = Color.gray; * specialAttack_Button.colors = buttonColor;*/ #endregion #region Mobile Buttons //attackButton.onClick.AddListener(() => Attack()); //kickButton.onClick.AddListener(() => Kick()); //specialAttack_Button.onClick.AddListener(() => SpecialAttack()); #endregion }