Handle exit elevators and secret levels
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:wolf_3d_data_types/wolf_3d_data_types.dart';
|
||||
import 'package:wolf_dart/features/screens/difficulty_screen.dart';
|
||||
import 'package:wolf_dart/wolf_3d.dart';
|
||||
|
||||
@@ -10,15 +11,6 @@ class EpisodeScreen extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _EpisodeScreenState extends State<EpisodeScreen> {
|
||||
final List<String> _episodeNames = [
|
||||
"Episode 1\nEscape from Wolfenstein",
|
||||
"Episode 2\nOperation: Eisenfaust",
|
||||
"Episode 3\nDie, Fuhrer, Die!",
|
||||
"Episode 4\nA Dark Secret",
|
||||
"Episode 5\nTrail of the Madman",
|
||||
"Episode 6\nConfrontation",
|
||||
];
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
@@ -36,7 +28,7 @@ class _EpisodeScreenState extends State<EpisodeScreen> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final int numberOfEpisodes = Wolf3d.I.activeGame.numberOfEpisodes;
|
||||
final List<Episode> episodes = Wolf3d.I.activeGame.episodes;
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.black,
|
||||
@@ -56,8 +48,9 @@ class _EpisodeScreenState extends State<EpisodeScreen> {
|
||||
const SizedBox(height: 40),
|
||||
ListView.builder(
|
||||
shrinkWrap: true,
|
||||
itemCount: numberOfEpisodes,
|
||||
itemCount: episodes.length,
|
||||
itemBuilder: (context, index) {
|
||||
final Episode episode = episodes[index];
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 8.0,
|
||||
@@ -74,7 +67,7 @@ class _EpisodeScreenState extends State<EpisodeScreen> {
|
||||
),
|
||||
onPressed: () => _selectEpisode(index),
|
||||
child: Text(
|
||||
_episodeNames[index],
|
||||
episode.name,
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(fontSize: 18),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user