public override void UpdateAction() { base.UpdateAction(); PlayerUtil.CardInterfaceLogicMacro(); if (EntityUtil.HitDeadLogicMacro(Owner, "PlayerHitAction", "PlayerDeadAction")) { return; } Owner.NavAgent.Move(Owner.transform.forward * Isometric.IsometricTileSize.x * 0.5f * Time.deltaTime); float currentAnimTime = AnimUtil.GetAnimNormalizedTime(Owner); if (currentAnimTime > 0.6f) { if (PlayerUtil.GetAttackInput()) { isAttackCommand = true; } } if (AnimUtil.IsLastFrame(Owner)) { Owner.CurrentAction = isAttackCommand ? (CharacterAction)PlayerAttack1Action.GetInstance() : (CharacterAction)PlayerIdleAction.GetInstance(); return; } }
public override void UpdateAction() { base.UpdateAction(); if (EntityUtil.StateActionMacro(Owner)) { return; } 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); float currentAnimTime = AnimUtil.GetAnimNormalizedTime(Owner); if (AnimUtil.IsLastFrame(Owner)) { Owner.CurrentAction = isAttackCommand ? (CharacterAction)PlayerAttack1Action.GetInstance() : (CharacterAction)PlayerIdleAction.GetInstance(); return; } if (currentAnimTime >= 0.78f && isAttackCommand) { Owner.CurrentAction = (CharacterAction)PlayerAttack1Action.GetInstance(); return; } if (currentAnimTime <= 0.77f) { if (PlayerUtil.GetAttackInput()) { isAttackCommand = true; } } }