add zoom to tiled map
MODIFY
example/lib/game_manual_map.dart
example/lib/game_manual_map.dart
@@ -56,6 +56,7 @@ class GameManualMap extends StatelessWidget implements GameListener {
background: BackgroundColorGame(Colors.blueGrey[900]),
gameController: _controller..setListener(this),
lightingColorGame: Colors.black.withOpacity(0.5),
+ zoom: 1.0, // you can change the game zoom here or directly on camera
);
});
}

MODIFY
example/lib/game_tiled_map.dart
example/lib/game_tiled_map.dart
@@ -65,6 +65,7 @@ class GameTiledMap extends StatelessWidget {
'chest', (x, y, width, height) => Chest(Position(x, y))),
background: BackgroundColorGame(Colors.blueGrey[900]),
lightingColorGame: Colors.black.withOpacity(0.6),
+ zoom: 1.0, // you can change the game zoom here or directly on camera
);
},
);

MODIFY
example/lib/player/knight.dart
example/lib/player/knight.dart
@@ -198,10 +198,10 @@ class Knight extends SimplePlayer with WithLighting {
if (showObserveEnemy) return;
showObserveEnemy = true;
showEmote();
-// if (!showTalk) {
-// showTalk = true;
-// _showTalk();
-// }
+ if (!showTalk) {
+ showTalk = true;
+ _showTalk();
+ }
},
);
}

MODIFY
example/pubspec.lock
example/pubspec.lock
@@ -57,6 +57,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.3"
+ clock:
+ dependency: transitive
+ description:
+ name: clock
+ url: "https://pub.dartlang.org"
+ source: hosted
+ version: "1.0.1"
collection:
dependency: transitive
description:
@@ -78,6 +85,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.4"
+ fake_async:
+ dependency: transitive
+ description:
+ name: fake_async
+ url: "https://pub.dartlang.org"
+ source: hosted
+ version: "1.1.0"
flame:
dependency: transitive
description:
@@ -121,13 +135,6 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
- image:
- dependency: transitive
- description:
- name: image
- url: "https://pub.dartlang.org"
- source: hosted
- version: "2.1.12"
matcher:
dependency: transitive
description:
@@ -155,7 +162,7 @@ packages:
name: path
url: "https://pub.dartlang.org"
source: hosted
- version: "1.6.4"
+ version: "1.7.0"
path_drawing:
dependency: transitive
description:
@@ -212,13 +219,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.2"
- quiver:
- dependency: transitive
- description:
- name: quiver
- url: "https://pub.dartlang.org"
- source: hosted
- version: "2.1.3"
sky_engine:
dependency: transitive
description: flutter
@@ -272,7 +272,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
- version: "0.2.15"
+ version: "0.2.16"
tiled:
dependency: transitive
description:

MODIFY
lib/bonfire_tiled_widget.dart
lib/bonfire_tiled_widget.dart
@@ -22,9 +22,10 @@ class BonfireTiledWidget extends StatefulWidget {
final Color lightingColorGame;
final TiledWorldMap tiledMap;
final Widget progress;
+ final double zoom;
- const BonfireTiledWidget(
- {Key key,
+ const BonfireTiledWidget({
+ Key key,
this.joystick,
this.player,
this.interface,
@@ -37,8 +38,9 @@ class BonfireTiledWidget extends StatefulWidget {
this.collisionAreaColor,
this.lightingColorGame,
this.tiledMap,
- this.progress})
- : super(key: key);
+ this.progress,
+ this.zoom,
+ }) : super(key: key);
@override
_BonfireTiledWidgetState createState() => _BonfireTiledWidgetState();
}
@@ -108,6 +110,7 @@ class _BonfireTiledWidgetState extends State<BonfireTiledWidget>
collisionAreaColor:
widget.collisionAreaColor ?? Colors.lightGreenAccent.withOpacity(0.5),
lightingColorGame: widget.lightingColorGame,
+ zoom: widget.zoom,
);
setState(() {
_loading = false;

add zoom to tiled map