Open shingo-nakanishi opened 2 weeks ago
Hi @shingo-nakanishi ! This is a incredible tutorial. I don't knew about that. Thanks for sharing.
So, if you can move you player to other position of the map and adds some animation you can use the lighting resources adds a black animation while you move your player. Like this:
gameRef.lighting.animateToColor(Colors.black);
And after move :
gameRef.lighting.animateToColor(Colors.transparent);
Other way is using the flutter resources. For example, you can criar a dialog that do a face in and fade out in a black screen, then you can show this dialog and move you player.
If you are call another screen (other widget with BonfireWidget) you can use de flutter screen transaction too.
I hope this can help you ☺️
@RafaelBarbosatec
It was a good article. Thanks to this article, I was able to get a good grasp of the concept. It seems that WorldMapByTiled only needs to receive the next map as shown below.
WorldMapByTiled(
TiledAssetReader(asset: 'maps/map01.tmj'),
forceTileSize: Vector2(tileSize, tileSize),
objectsBuilder: {
'bottomExitSensor': (properties) => ExitMapSensor(
position: properties.position,
size: properties.size,
nextMap: const HalloweenMap02(), // 👈👈👈
),
},
...
)
Where should I place gameRef.lighting.animateToColor(Colors.black);
?
Humm. In this case, a I recommend you create an other widget with your BonfireWidget and your configurations like map ,enemies, etc. This way you can use the flutter navigation: Navigator.of(context).pushNamed('/other-map')
Or you can use the same widget but passing arguments de configurations of map, enemies, etc.
Take a look this example:
You can test this example in the bonfire demo. Select in the menu Mini Games-> Multi Scenarios game:
@RafaelBarbosatec
I tried the following, but it resulted in an error.(I moved the character to the right edge.) https://bonfire-engine.github.io/examples/bonfire-v3/
I'll look it. But take a look the code to get a idea
How can we help?
I was able to implement screen transitions using WorldMapByTiled. Reference: https://qiita.com/KAZMA_WED/items/c1d33ff4dcd293ade1af
Questions: