attack flow - breaking and blocking input, roll improvements
This commit is contained in:
@@ -4,6 +4,7 @@ using Invector.vEventSystems;
|
||||
using Invector.vMelee;
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using UnityEngine.Android;
|
||||
|
||||
namespace Beyond
|
||||
{
|
||||
@@ -23,6 +24,8 @@ namespace Beyond
|
||||
internal vMeleeManager meleeManager;
|
||||
protected bool _isAttacking;
|
||||
|
||||
public bool BlockAttack { get; set; }
|
||||
|
||||
public bool isAttacking
|
||||
{
|
||||
get => _isAttacking || (cc != null && cc.IsAnimatorTag("Attack"));
|
||||
@@ -87,16 +90,17 @@ namespace Beyond
|
||||
autoTargeting = GetComponent<AutoTargetting>();
|
||||
if (autoTargeting == null && Player.Instance != null && Player.Instance.gameObject == this.gameObject)
|
||||
{
|
||||
autoTargeting = Player.Instance.GetComponent<AutoTargetting>();
|
||||
autoTargeting = Player.Instance.GetComponent<AutoTargetting>();
|
||||
}
|
||||
if (autoTargeting == null && cc != null && cc.transform.root != null)
|
||||
{
|
||||
autoTargeting = cc.transform.root.GetComponentInChildren<AutoTargetting>(true);
|
||||
autoTargeting = cc.transform.root.GetComponentInChildren<AutoTargetting>(true);
|
||||
}
|
||||
if (autoTargeting == null)
|
||||
{
|
||||
Debug.LogWarning("bMeleeCombatInput: AutoTargetting component not found. Dash towards target will require manual aiming.");
|
||||
}
|
||||
BlockAttack = false;
|
||||
}
|
||||
|
||||
protected override void LateUpdate()
|
||||
@@ -241,7 +245,7 @@ namespace Beyond
|
||||
public virtual bool MeleeAttackConditions()
|
||||
{
|
||||
if (meleeManager == null) meleeManager = GetComponent<vMeleeManager>();
|
||||
return meleeManager != null && cc != null && cc.isGrounded && !cc.customAction && !cc.IsAnimatorTag("special") &&
|
||||
return !BlockAttack && meleeManager != null && cc != null && cc.isGrounded && !cc.customAction && !cc.IsAnimatorTag("special") &&
|
||||
!cc.isJumping && !cc.isCrouching && !cc.isRolling && !isEquipping &&
|
||||
(cc.animator != null && !cc.animator.IsInTransition(cc.baseLayer)) && !isRotatingAndDashing;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user