Skip to content

Commit

Permalink
feat: flame version update, use fast touch plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
ASGAlex committed Oct 4, 2023
1 parent a4e08a5 commit 1b8333f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions example/lib/game.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import 'package:flame/events.dart';
import 'package:flame/extensions.dart';
import 'package:flame/game.dart';
import 'package:flame/input.dart';
import 'package:flame_fast_touch/flame_fast_touch.dart';
import 'package:flame_message_stream/flame_message_stream.dart';
import 'package:flame_spatial_grid/flame_spatial_grid.dart';
import 'package:flutter/foundation.dart';
Expand All @@ -25,6 +26,7 @@ class SpatialGridExample extends FlameGame<MyWorld>
KeyboardEvents,
ScrollDetector,
ScaleDetector,
FastTouch<MyWorld>,
HasMessageProviders {
SpatialGridExample() : super(world: MyWorld()) {
loadingStream = messageProvidersManager
Expand Down Expand Up @@ -69,6 +71,7 @@ all collisions are disabled.
camera.viewfinder.zoom = 5;
camera.priority = 999;
camera.follow(player, maxSpeed: 200, snap: true);
componentsAtPointRoot = camera.viewport;

// check that manual loading works correctly (not necessary line)
await tilesetManager.loadTileset('tileset.tsx');
Expand Down
5 changes: 4 additions & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,13 @@ environment:
# the latest version available on pub.dev. To see which dependencies have newer
# versions available, run `flutter pub outdated`.
dependencies:
flame: 1.9.0
flame: 1.9.1
flame_spatial_grid: #0.8.0
path: ../
flame_message_stream: 0.0.2
flame_fast_touch:
git: git@github.com:ASGAlex/flame_fast_touch.git
# path: ../../flame_fast_touch

flutter:
sdk: flutter
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ environment:
sdk: '>=3.0.0 <4.0.0'

dependencies:
flame: 1.9.0
flame: 1.9.1
flame_tiled: ^1.12.0
meta: ^1.8.0
collection: any
Expand Down

0 comments on commit 1b8333f

Please sign in to comment.