103 lines
3.4 KiB
C#
103 lines
3.4 KiB
C#
using System.Collections.Generic;
|
|
using Cielonos.MainGame.Characters;
|
|
|
|
namespace Cielonos.MainGame.Inventory.Collections
|
|
{
|
|
public partial class FutureWand
|
|
{
|
|
/// <summary>
|
|
/// 轻攻击输入。
|
|
/// </summary>
|
|
public override void OnPrimaryPress(List<PlayerInputModifierType> modifiers = null)
|
|
{
|
|
if(_isHoldingAttack) return;
|
|
|
|
CharacterBase target = RefreshPrimaryTarget();
|
|
|
|
if (modifiers.Has(PlayerInputModifierType.SpecialB))
|
|
{
|
|
if (functionSm["CubicAttack"].IsAvailable() && fullBodyFuncAnimSm.CheckPlayability() && PlayCubicAttack(PrimaryTarget))
|
|
{
|
|
comboSm.main.Reset();
|
|
}
|
|
|
|
return;
|
|
}
|
|
|
|
if (functionSm["LightAttack"].IsAvailable() && fullBodyFuncAnimSm.CheckPlayability())
|
|
{
|
|
string nextNodeName = comboSm.main.GetNextNodeName("L");
|
|
if (PlayNormalAttackL(target, nextNodeName))
|
|
{
|
|
comboSm.main.NextCombo("L");
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 重攻击输入。
|
|
/// </summary>
|
|
public override void OnSecondaryPress(List<PlayerInputModifierType> modifiers = null)
|
|
{
|
|
if (!_isHoldingAttack && modifiers.Has(PlayerInputModifierType.SpecialB))
|
|
{
|
|
if (_hasStellarRingQuickcaster && PlayStellarRingQuickcasterSpinArea())
|
|
{
|
|
_isHoldingAttack = false;
|
|
return;
|
|
}
|
|
|
|
CharacterBase target = RefreshPrimaryTarget();
|
|
if (functionSm["SpinArea"].IsAvailable() && fullBodyFuncAnimSm.CheckPlayability() && PlayHoldAttackStart(target))
|
|
{
|
|
_isHoldingAttack = true;
|
|
}
|
|
return;
|
|
}
|
|
|
|
if (functionSm["HeavyAttack"].IsAvailable() && fullBodyFuncAnimSm.CheckPlayability())
|
|
{
|
|
CharacterBase target = RefreshPrimaryTargetByMelee();
|
|
string nextNodeName = comboSm.main.GetNextNodeName("R");
|
|
if (PlayNormalAttackR(target, nextNodeName))
|
|
{
|
|
comboSm.main.NextCombo("R");
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 重攻击释放。
|
|
/// </summary>
|
|
public override void OnSecondaryRelease()
|
|
{
|
|
if (_isHoldingAttack)
|
|
{
|
|
string animName = player.animationSc.fullBodyFuncAnimSm.currentRuntimeFuncAnim?.animationName;
|
|
if (animName is "HoldAttackLoop" or "HoldAttackStart")
|
|
{
|
|
if (_spinAreaUpgradeCount == 0)
|
|
{
|
|
PlayHoldAttackEnd();
|
|
}
|
|
else
|
|
{
|
|
PlayReleaseSpinArea();
|
|
}
|
|
}
|
|
RecallAllSpinAreas();
|
|
}
|
|
|
|
_isHoldingAttack = false;
|
|
}
|
|
|
|
public override void OnSpecialAPress(List<PlayerInputModifierType> modifiers = null)
|
|
{
|
|
if (functionSm["Lightning"].IsAvailable() && fullBodyFuncAnimSm.CheckPlayability())
|
|
{
|
|
PlayLightning(RefreshPrimaryTarget());
|
|
}
|
|
}
|
|
}
|
|
}
|