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(); PlayerUtil.CardInterfaceLogicMacro(); if (EntityUtil.HitDeadLogicMacro(Owner, "PlayerHitAction", "PlayerDeadAction")) { return; } if (PlayerUtil.GetAttackInput()) { Owner.CurrentAction = PlayerAttackAction.GetInstance(); return; } Vector3 velocity = PlayerUtil.GetVelocityInput(); if (velocity.magnitude < 0.1f) { Owner.CurrentAction = PlayerIdleAction.GetInstance(); return; } Owner.transform.rotation = Quaternion.LookRotation(velocity, Vector3.up); Owner.NavAgent.Move(velocity * 1.1f * Time.deltaTime); AnimUtil.RotationAnim(Owner, "run"); }
public override void UpdateAction() { base.UpdateAction(); PlayerUtil.CardInterfaceLogicMacro(); if (EntityUtil.DeadLogicMacro(Owner, "PlayerDeadAction")) { return; } if (AnimUtil.IsLastFrame(Owner)) { Owner.CurrentAction = PlayerIdleAction.GetInstance(); return; } }
public override void UpdateAction() { base.UpdateAction(); PlayerUtil.CardInterfaceLogicMacro(); if (EntityUtil.DeadLogicMacro(Owner, "PlayerDeadAction")) { return; } Owner.NavAgent.Move(Owner.transform.forward * Isometric.IsometricTileSize.x * 0.5f * Time.deltaTime); if (AnimUtil.IsLastFrame(Owner)) { Owner.CurrentAction = PlayerIdleAction.GetInstance(); return; } }
public override void UpdateAction() { base.UpdateAction(); PlayerUtil.CardInterfaceLogicMacro(); if (EntityUtil.HitDeadLogicMacro(Owner, "PlayerHitAction", "PlayerDeadAction")) { return; } if (PlayerUtil.GetAttackInput()) { Owner.CurrentAction = PlayerAttackAction.GetInstance(); return; } Vector3 velocity = PlayerUtil.GetVelocityInput(); if (velocity.magnitude > 0.1f) { Owner.CurrentAction = PlayerMoveAction.GetInstance(); return; } }