RafaelBarbosatec / bonfire

(RPG maker) Create RPG-style or similar games more simply with Flame.
https://bonfire-engine.github.io
MIT License
1.17k stars 176 forks source link

[question]: Control the game from Flutter app. #510

Closed ahndwon closed 1 month ago

ahndwon commented 2 months ago

How can we help?

Hello, always thanks for this wonderful repository. It is really a life saver for an app developer like me that does not have game dev experience.

I am currently making a Tamagotchi Flutter app. And I want to control the game from Blocs.

It seems that BonfireGame can be only achieved by overlayWidgetBuilders. But that makes the game to run always and just overlay Flutter widgets. I want to run the BonfireWidget only on some pages.

It would be great if BonfireGame is injected from outside of BonfireWidget. It currently is created within the BonfireWidget and is private. If BonfireGame is injected instead, it would make the game controllable by blocs or any other state managements.

RafaelBarbosatec commented 1 month ago

Hi @ahndwon ! Thanks for contacting and for interest in Bonfire! Great project! ☺️ You can get BonfireGame in the onReady method.

ahndwon commented 1 month ago

Thanks for the comment. I'll check it out and close this issue!