Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

what is the best approach to use unirx with mono functionionality like move towards and play animations sequntially? #505

Open
virtouso opened this issue Oct 21, 2021 · 1 comment

Comments

@virtouso
Copy link

virtouso commented Oct 21, 2021

hi.

for a turn-based game, I need to do some actions sequentially.

for example, moving an object to a position, then playing animation, and then doing a change in UI. I think using RX is a good solution for this but I don't know how to use it?

on documentation, unirx suggests using coroutines with rx. is it the best choice?

@rus89
Copy link

rus89 commented Oct 25, 2021

👋 @virtouso,

I don't know what's the best solution for your problem, but I have some ideas that maybe can help you out.
You can fire an event with MessageBroker after every of the before mentioned actions are completed, and register listeners that are interested in knowing when those actions are completed.
Also, if you are performing those actions with UniRx, then you can use OnCompleted event to do the next action in the sequence

Hope this will help you out 🙂

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants