Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External dice roll triggers #9

Closed
ianleblancbomb opened this issue Feb 25, 2022 · 2 comments
Closed

External dice roll triggers #9

ianleblancbomb opened this issue Feb 25, 2022 · 2 comments

Comments

@ianleblancbomb
Copy link

Not an issue per say but would be nice to trigger dice roll externally from clicking on dice so multiple dice on screen can all be triggered at once.

@Rakeshpradhan1999
Copy link

I also want this function

@avaneeshtripathi
Copy link
Owner

@ianleblancbomb @Rakeshpradhan1999
To achieve this,
You can pass refs to the dice components, and use that ref to trigger the dice roll

Ex: diceRef.rollDice()

this method can be used, its not typescripted though. But it does work.

for multiple dices, you can pass refs to all the dices and then trigger rollDice for all of them.

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

No branches or pull requests

3 participants