角色能力,存档
This commit is contained in:
@@ -23,21 +23,22 @@ namespace BaseGames.Player.States
|
||||
if (Owner.Combat != null)
|
||||
Owner.Combat.OnDownHitConfirmed += OnDownHitConfirmed;
|
||||
|
||||
Owner.Combat?.EnableWeaponHitBox(AttackDirection.Down);
|
||||
var step = Owner.Weapon?.ActiveWeapon?.GetDirStep(AttackDirection.Down);
|
||||
float spd = Stats?.AnimatorSpeedMultiplier ?? 1f;
|
||||
|
||||
var clip = Owner.Weapon?.ActiveWeapon?.downAttackClip;
|
||||
if (clip != null && clip.Clip != null)
|
||||
if (step?.clip?.Clip != null)
|
||||
{
|
||||
var state = Anim.Play(clip);
|
||||
state.Events(this).OnEnd = OnClipEnd;
|
||||
}
|
||||
else if (AnimCfg?.DownAttack != null)
|
||||
{
|
||||
var state = Anim.Play(AnimCfg.DownAttack);
|
||||
state.Events(this).OnEnd = OnClipEnd;
|
||||
var animState = Anim.Play(step.Value.clip);
|
||||
animState.Speed *= spd;
|
||||
var events = animState.Events(this);
|
||||
events.OnEnd = OnClipEnd;
|
||||
var s = step.Value;
|
||||
events.Add(s.hitBoxEnter, () => Owner.Combat?.EnableWeaponHitBox(AttackDirection.Down, s.hitBoxId));
|
||||
events.Add(step.Value.hitBoxExit, () => Owner.Combat?.DisableAllWeaponHitBoxes());
|
||||
}
|
||||
else
|
||||
{
|
||||
Owner.Combat?.EnableWeaponHitBox(AttackDirection.Down);
|
||||
OnClipEnd();
|
||||
}
|
||||
|
||||
@@ -58,7 +59,9 @@ namespace BaseGames.Player.States
|
||||
{
|
||||
if (_hasHitEnemy) return;
|
||||
_hasHitEnemy = true;
|
||||
// Pogo 弹跳:命中敌人后向上弹起
|
||||
// Pogo 弹跳:命中敌人后向上弹起,同时重置空中能力(等同落地效果)
|
||||
Owner.ResetAirJumps();
|
||||
Owner.GetState<DashState>()?.ResetAirDash();
|
||||
Move.Jump();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user