fledge_yarn 0.3.1 copy "fledge_yarn: ^0.3.1" to clipboard
fledge_yarn: ^0.3.1 copied to clipboard

Yarn Spinner dialogue system for the Fledge ECS game framework. Parse .yarn files and run interactive dialogues.

fledge_yarn #

Yarn Spinner dialogue system for Fledge games. Parse .yarn files and run interactive dialogues with branching narratives.

pub package

Installation #

dependencies:
  fledge_yarn: ^0.2.1

Quick Start #

import 'package:fledge_ecs/fledge_ecs.dart';
import 'package:fledge_yarn/fledge_yarn.dart';
import 'package:flutter/services.dart';

Future<void> main() async {
  final app = App()
    ..addPlugin(YarnPlugin())
    ..addPlugin(DialogueCorePlugin()); // event-driven dialogue layer

  final project = app.world.getResource<YarnProject>()!;
  project.parse(await rootBundle.loadString('assets/dialogue/npcs.yarn'));

  app.world.eventWriter<DialogueStartRequested>().send(
    const DialogueStartRequested('sara_greeting'),
  );

  await app.run();
}

DialogueCorePlugin adds a DialogueState resource, a set of request / notification events, holding-command support (registerHoldingCommand), and the DialogueBoxWidget — see the plugin docs for the full API.

Documentation #

See the Fledge documentation site for guides, API reference, and advanced usage.

License #

Apache 2.0 - See LICENSE for details.

0
likes
160
points
138
downloads

Documentation

API reference

Publisher

verified publisherfledge-framework.dev

Weekly Downloads

Yarn Spinner dialogue system for the Fledge ECS game framework. Parse .yarn files and run interactive dialogues.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#ecs #game-engine #dialogue #yarn-spinner #flutter-games

License

Apache-2.0 (license)

Dependencies

fledge_ecs, flutter, meta

More

Packages that depend on fledge_yarn