public void CombatInput(CombatQueueElement element) { Debug.Log($"ComboIndex: {_comboIndex} || MaxCombo: {_maxCombo}"); if (_attackAllowed == true) { _comboIndex++; Anim.SetInteger("AttackIndex", _comboIndex); _playerData.ActionController.Rb.useGravity = false; _playerData.ActionController.Rb.velocity = Vector3.zero; _marginCombo = false; _marginComboTime = _playerData.TimeToResetCombo; if (element.Attack == AttackType.Weak) { _weakAttack.TryAttack(_cameraData.EnemyTargeted, PlayerTransf, Anim); } else if (element.Attack == AttackType.Heavy) { _heavyAttack.TryAttack(_cameraData.EnemyTargeted, PlayerTransf, Anim); } _attackAllowed = false; _chainedAnimation = true; } }
public override void InputEffect(InputAction.CallbackContext context) { if (context.phase == InputActionPhase.Started) { CombatQueueElement newAttack = new CombatQueueElement(); newAttack.Attack = AttackType.Weak; newAttack.IsGrounded = _playerData.isGrounded; newAttack.Quality = 1; CSystem.CombatInput(newAttack); } }