question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

moveTo return promise/obs to indicate done

See original GitHub issue

i have often in my game the need to perform either an emote or changing the facing direction after a finished move. E.g I can order an NPC to start gathering resources at XY and once he arrives there he/she confirms the action.

i have a helper like this

private async waitForCurrentMovementStopped() {
    return firstValueFrom(this.scene
      .gridEngine
      .movementStopped()
      .pipe(
        filter(m => m.charId === this.id),
        take(1)
      ));
  }

and wondered whether moveTo could return either a promise (preferably) or obs so that can be handled in one go?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
zewa666commented, Mar 9, 2022

I’m sorry it seems my vscode project had some troubles. after a wipe of npm_modules and re-installing I can see the intellisense suggestions now properly and the returned obs.

0reactions
Annoraaqcommented, Mar 14, 2022

I created an issue for that #241

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is the difference between "event loop queue" and "job ...
The ECMAscript 2015 (ES6) specification requires tasks to run Promise reaction callbacks to form their own job queue called "PromiseJobs".
Read more >
websters1913.txt - paulgorman.org
Note : A 1 is also applied colloquially to other things to imply superiority; prime; ... It always something to be done, and...
Read more >
A Process Study of Iowa's Post-Employment Pilot Program
The state of Iowa made an early commitment to job retention and advancement ... These results indicated that FIP had increased employment and...
Read more >
wbstr10a.txt
If you received it on a physical medium, you must return it with your note, and such person may choose to alternatively give...
Read more >
Webster's Unabridged Dictionary
Note : It is placed before nouns of the singular number denoting an individual object, ... It always something to be done, and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found