Added ability to swap renderers

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
2026-03-16 16:01:58 +01:00
parent f95c129522
commit 0963869b0c
5 changed files with 197 additions and 34 deletions

View File

@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:wolf_3d_data_types/wolf_3d_data_types.dart';
import 'package:wolf_3d_flutter/wolf_3d.dart';
import 'package:wolf_3d_renderer/wolf_3d_flutter_renderer.dart';
import 'package:wolf_3d_gui/screens/game_screen.dart';
class DifficultyScreen extends StatefulWidget {
const DifficultyScreen({
@@ -26,12 +26,18 @@ class _DifficultyScreenState extends State<DifficultyScreen> {
Navigator.of(context).pushReplacement(
MaterialPageRoute(
builder: (_) => WolfFlutterRenderer(
Wolf3d.I.activeGame,
builder: (context) => GameScreen(
data: Wolf3d.I.activeGame,
difficulty: difficulty,
startingEpisode: Wolf3d.I.activeEpisode,
audio: Wolf3d.I.audio,
),
// builder: (_) => WolfFlutterRenderer(
// Wolf3d.I.activeGame,
// difficulty: difficulty,
// startingEpisode: Wolf3d.I.activeEpisode,
// audio: Wolf3d.I.audio,
// ),
),
);
}