WIP moving difficulty selection to engine
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
@@ -4,7 +4,7 @@ library;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:wolf_3d_dart/wolf_3d_data_types.dart';
|
||||
import 'package:wolf_3d_flutter/wolf_3d_flutter.dart';
|
||||
import 'package:wolf_3d_gui/screens/difficulty_screen.dart';
|
||||
import 'package:wolf_3d_gui/screens/game_screen.dart';
|
||||
import 'package:wolf_3d_gui/screens/sprite_gallery.dart';
|
||||
import 'package:wolf_3d_gui/screens/vga_gallery.dart';
|
||||
|
||||
@@ -27,12 +27,13 @@ class _EpisodeScreenState extends State<EpisodeScreen> {
|
||||
widget.wolf3d.audio.playMenuMusic();
|
||||
}
|
||||
|
||||
/// Persists the chosen episode in [Wolf3d] and advances to difficulty select.
|
||||
/// Persists the chosen episode and lets the engine present difficulty select.
|
||||
void _selectEpisode(int index) {
|
||||
widget.wolf3d.setActiveEpisode(index);
|
||||
widget.wolf3d.clearActiveDifficulty();
|
||||
Navigator.of(context).push(
|
||||
MaterialPageRoute(
|
||||
builder: (context) => DifficultyScreen(wolf3d: widget.wolf3d),
|
||||
builder: (context) => GameScreen(wolf3d: widget.wolf3d),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user