Files

37 lines
1.6 KiB
C#

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("Wave: " + GameStats.Wave.ToString(), "The wave you died on."))
.Add(new MenuEntry("Total play time: " + TimeSpan.FromSeconds(GameStats.TotalPlayTime).ToString(), "How much time you spent on this run"))
.Add(new MenuEntry("OK", "Go back to main menu"));
base.Activate();
}
public override void SelectItem()
{
base.SelectItem();
if (CursorPosition == MenuOptions.Entries.Count-1)
{
Manager.RemoveScreen(this);
Manager.AddScreen(new MainMenuScreen());
}
}
}
}