flame_behaviors 1.0.0 copy "flame_behaviors: ^1.0.0" to clipboard
flame_behaviors: ^1.0.0 copied to clipboard

Flame Behaviors applies separation of concerns to game logic in the form of Entities and Behaviors, built by Very Good Ventures.

example/lib/main.dart

import 'package:example/behaviors/behaviors.dart';
import 'package:flame/components.dart';
import 'package:flame/game.dart';
import 'package:flame_behaviors/flame_behaviors.dart';
import 'package:flutter/material.dart';

class ExampleGame extends FlameGame with EntityMixin, HasCollisionDetection {
  @override
  Future<void> onLoad() async {
    await add(FpsTextComponent(position: Vector2.zero()));
    await add(ScreenHitbox());

    // Game-specific behaviors
    await add(SpawningBehavior());

    return super.onLoad();
  }
}

void main() {
  runApp(GameWidget(game: ExampleGame()));
}
31
likes
0
pub points
90%
popularity

Publisher

verified publisherverygood.ventures

Flame Behaviors applies separation of concerns to game logic in the form of Entities and Behaviors, built by Very Good Ventures.

Repository (GitHub)
View/report issues

Documentation

Documentation

License

unknown (license)

Dependencies

flame, flutter

More

Packages that depend on flame_behaviors