public override void UpdateAction() { base.UpdateAction(); PlayerUtil.CardInterfaceLogicMacro(); if (EntityUtil.HitDeadLogicMacro(Owner, "PlayerHitAction", "PlayerDeadAction")) { return; } float currentAnimTime = AnimUtil.GetAnimNormalizedTime(Owner); if (currentAnimTime > 0.6f) { if (PlayerUtil.GetAttackInput()) { isAttackCommand = true; } } Owner.NavAgent.Move(Owner.transform.forward * Isometric.IsometricTileSize.x * -0.3f * Time.deltaTime); if (AnimUtil.IsLastFrame(Owner)) { Owner.CurrentAction = isAttackCommand ? (CharacterAction)PlayerAttack2Action.GetInstance() : (CharacterAction)PlayerIdleAction.GetInstance(); return; } }
public override void UpdateAction() { base.UpdateAction(); if (EntityUtil.StateActionMacro(Owner)) { return; } float currentAnimTime = AnimUtil.GetAnimNormalizedTime(Owner); Owner.NavAgent.Move(-Owner.transform.forward * Isometric.IsometricGridSize * Owner.Status.CurrentSpeed * curve.Evaluate(ElapsedTime) * Time.deltaTime + Owner.transform.forward * Mathf.Clamp01(Vector3.Dot(PlayerUtil.GetVelocityInput(), Owner.transform.forward)) * Isometric.IsometricGridSize * Owner.Status.CurrentSpeed * Time.deltaTime); if (AnimUtil.IsLastFrame(Owner)) { Owner.CurrentAction = (CharacterAction)PlayerIdleAction.GetInstance(); return; } if (currentAnimTime >= 0.68f && isAttackCommand) { Owner.CurrentAction = (CharacterAction)PlayerAttack2Action.GetInstance(); return; } if (currentAnimTime < 0.67f) { if (PlayerUtil.GetAttackInput()) { isAttackCommand = true; } } }