FututeWand初步
This commit is contained in:
@@ -13,6 +13,9 @@ namespace Cielonos.MainGame.Inventory.Collections
|
||||
|
||||
private NormalArea _activeSpinArea;
|
||||
|
||||
private VFXObject _spinAreaChargeVFX;
|
||||
private int _spinAreaUpgradeCount = 0;
|
||||
|
||||
private Transform Muzzle => viewObjects["Wand"].functionalParts["Muzzle"].transform;
|
||||
|
||||
public override void OnEquipped()
|
||||
@@ -45,32 +48,44 @@ namespace Cielonos.MainGame.Inventory.Collections
|
||||
RecallActiveSpinArea();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 轻攻击(普攻)输入处理
|
||||
/// </summary>
|
||||
public override void OnPrimaryPress()
|
||||
{
|
||||
// 判定是否满足特殊蓄力攻击条件
|
||||
if (!_isHoldingAttack && player.inputSc.IsHoldingSpecialA)
|
||||
{
|
||||
PlayTargetedAnimation("HoldAttackStart", currentTarget);
|
||||
_isHoldingAttack = true;
|
||||
if (PlayHoldAttackStart(currentTarget))
|
||||
{
|
||||
_isHoldingAttack = true;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// 常规地面轻攻击连击
|
||||
if (functionSm["LightAttack"].IsAvailable() && fullBodyFuncAnimSm.CheckPlayability())
|
||||
{
|
||||
comboSm.main.NextCombo("L");
|
||||
functionSm["LightAttack"].Execute();
|
||||
currentTarget = CombatManager.EnemySm.GetNearestEnemy(25f);
|
||||
PlayTargetedAnimation("Attack" + comboSm.main.GetCurrentNodeName(), currentTarget, 5f);
|
||||
string nextNodeName = comboSm.main.GetNextNodeName("L");
|
||||
if (PlayNormalAttackL(currentTarget, nextNodeName))
|
||||
{
|
||||
comboSm.main.NextCombo("L");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 轻攻击释放处理
|
||||
/// </summary>
|
||||
public override void OnPrimaryRelease()
|
||||
{
|
||||
if (_isHoldingAttack)
|
||||
{
|
||||
string animName = player.animationSc.fullBodyFuncAnimSm.currentRuntimeFuncAnim?.animationName;
|
||||
if(animName == "HoldAttackLoop" || animName == "HoldAttackStart")
|
||||
if (animName == "HoldAttackLoop" || animName == "HoldAttackStart")
|
||||
{
|
||||
PlayTargetedAnimation("HoldAttackEnd");
|
||||
PlayHoldAttackEnd();
|
||||
}
|
||||
RecallActiveSpinArea();
|
||||
}
|
||||
@@ -78,30 +93,31 @@ namespace Cielonos.MainGame.Inventory.Collections
|
||||
_isHoldingAttack = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 重攻击输入处理
|
||||
/// </summary>
|
||||
public override void OnSecondaryPress()
|
||||
{
|
||||
if (_isHoldingAttack) return;
|
||||
|
||||
// 常规地面重攻击连击
|
||||
if (functionSm["HeavyAttack"].IsAvailable() && fullBodyFuncAnimSm.CheckPlayability())
|
||||
{
|
||||
comboSm.main.NextCombo("R");
|
||||
functionSm["HeavyAttack"].Execute();
|
||||
currentTarget = CombatManager.EnemySm.GetNearestEnemy(25f);
|
||||
PlayTargetedAnimation("Attack" + comboSm.main.GetCurrentNodeName(), currentTarget, 5f);
|
||||
string nextNodeName = comboSm.main.GetNextNodeName("R");
|
||||
if (PlayNormalAttackR(currentTarget, nextNodeName))
|
||||
{
|
||||
comboSm.main.NextCombo("R");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public partial class FutureWand
|
||||
{
|
||||
private void RecallActiveSpinArea()
|
||||
{
|
||||
if (_activeSpinArea?.moveSm is BoomerangMoveSubmodule boomerangSm)
|
||||
{
|
||||
boomerangSm.TriggerReturn(20, 10, float.MaxValue, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 玩家受击回调:中断当前的蓄力行为,并收回飞盘法阵
|
||||
/// </summary>
|
||||
private void OnPlayerGetHit(AttackAreaBase attackArea)
|
||||
{
|
||||
if (_isHoldingAttack)
|
||||
@@ -109,7 +125,7 @@ namespace Cielonos.MainGame.Inventory.Collections
|
||||
string animName = player.animationSc.fullBodyFuncAnimSm.currentRuntimeFuncAnim?.animationName;
|
||||
if (animName == "HoldAttackLoop" || animName == "HoldAttackStart")
|
||||
{
|
||||
PlayTargetedAnimation("HoldAttackEnd");
|
||||
PlayHoldAttackEnd();
|
||||
}
|
||||
_isHoldingAttack = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user