fledge_calendar 0.2.0
fledge_calendar: ^0.2.0 copied to clipboard
Calendar and in-game time system for Fledge games with configurable day/night cycles, seasons, and time scaling.
fledge_calendar #
In-game calendar and time-of-day system for Fledge games. Day/night cycles, seasons, and configurable time scaling.
Previously published as
fledge_time. The old package name still resolves via a re-export shim for one release — new code should depend onfledge_calendardirectly.
Installation #
dependencies:
fledge_calendar: ^0.2.0
Quick Start #
import 'package:fledge_ecs/fledge_ecs.dart';
import 'package:fledge_calendar/fledge_calendar.dart';
void main() async {
final app = App()
..addPlugin(WallTimePlugin())
..addPlugin(CalendarPlugin(config: CalendarConfig.farmingSim()));
await app.tick();
final calendar = app.world.getResource<Calendar>()!;
print(calendar.timeString); // "6:00 AM"
print(calendar.calendarString); // "Mon, Spring 1, Year 1"
await app.run();
}
Documentation #
See the Fledge documentation site for guides, API reference, and advanced usage.
License #
Apache 2.0 - See LICENSE for details.