npdart
Минимально рабочий игровой движок для создания визуальных новелл.
void main(){
runApp(const Example());
}
class Example extends StatelessWidget {
const Example({
super.key,
});
@override
Widget build(BuildContext context) {
const prefs = Preferences(savePath: '/example/');
return MaterialApp(
home: FutureBuilder(
future: getDefaultInitialSaveData(prefs),
builder: (context, snapshot) {
if (!snapshot.hasData) return Container(color: Colors.black);
return Novel(
initialState: snapshot.data!,
tree: Tree(scenes: {
'root': Scene(script: (stage, state) async => state.loadScene('root'))
}),
preferences: prefs);
},
),
);
}
}
Libraries
- core/audio
- core/character
- core/choice
- core/core
- core/event
- core/mouse
- core/novel
- core/preferences
- core/save
- core/scene
- core/stage
- core/state
- core/tree
- core/verse
- npdart
- widgets/background
- widgets/choices
- widgets/game
- widgets/painting/spritepainter
- widgets/painting/textpainter
- widgets/painting/textshape
- widgets/parallax
- widgets/sprites
- widgets/textbox
- widgets/typewriter
- widgets/ui/autoskip
- widgets/ui/border
- widgets/ui/history
- widgets/ui/load
- widgets/ui/option
- widgets/ui/save
- widgets/ui/ui