Files
evilsatellites/EvilSatellites/Screens/StatsScreen.cs
T

36 lines
1.5 KiB
C#
Raw Normal View History

2021-04-23 20:28:06 +02:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using EvilSatellites.Screens;
using EvilSatellites.Menu;
namespace EvilSatellites.Screens
{
public class StatsScreen : MenuScreen
{
public override void Activate()
{
MenuOptions = new MenuContainer("Statistics", "Statistics for current game");
MenuOptions.Add(new MenuEntry("Shots fired: " + GameStats.ShotsFired.ToString(), "Amount of shots fired during this game."))
.Add(new MenuEntry("Satellites shot: " + GameStats.SatellitesShot.ToString(), "Amount of satellites shot during this game."))
.Add(new MenuEntry("Debris collected: " + GameStats.DebrisCollected.ToString(), "Amount of debris collected during this game."))
.Add(new MenuEntry("Satellite collisions: " + GameStats.SatelliteCollisions.ToString(), "How many satellites you crashed into"))
.Add(new MenuEntry("Total play time: " + GameStats.TotalPlayTime.ToString(), "How much time you spent on this run"))
.Add(new MenuEntry("OK", "Go back to main menu"));
2021-04-23 21:08:37 +02:00
base.Activate();
2021-04-23 20:28:06 +02:00
}
public override void SelectItem()
{
2021-04-23 21:08:37 +02:00
base.SelectItem();
2021-04-23 20:28:06 +02:00
if (CursorPosition == MenuOptions.Entries.Count-1)
{
Manager.RemoveScreen(this);
Manager.AddScreen(new MainMenuScreen());
}
}
}
}