using System;␍␊ |
using System.Collections.Generic;␍␊ |
using System.Linq;␍␊ |
using System.Text;␍␊ |
using GameStateManagement;␍␊ |
using Microsoft.Xna.Framework;␍␊ |
␍␊ |
namespace axios_tennis␍␊ |
{␍␊ |
class TennisMainMenu : MenuScreen␍␊ |
{␍␊ |
public TennisMainMenu()␍␊ |
: base("Axios Tennis")␍␊ |
{␍␊ |
␍␊ |
}␍␊ |
public override void Activate(bool instancePreserved)␍␊ |
{␍␊ |
base.Activate(instancePreserved);␍␊ |
␍␊ |
MenuEntries.Add(new MenuEntry("Start"));␍␊ |
MenuEntries.Add(new MenuEntry("Exit"));␍␊ |
}␍␊ |
␍␊ |
protected override void OnSelectEntry(int entryIndex, Microsoft.Xna.Framework.PlayerIndex playerIndex)␍␊ |
{␍␊ |
base.OnSelectEntry(entryIndex, playerIndex);␍␊ |
␍␊ |
switch (entryIndex)␍␊ |
{␍␊ |
case 0:␍␊ |
this.ScreenManager.AddScreen(new TennisScreen(), PlayerIndex.One);␍␊ |
break;␍␊ |
case 1:␍␊ |
this.ScreenManager.Game.Exit();␍␊ |
break;␍␊ |
␍␊ |
}␍␊ |
}␍␊ |
␍␊ |
protected override void OnCancel(PlayerIndex playerIndex)␍␊ |
{␍␊ |
base.OnCancel(playerIndex);␍␊ |
␍␊ |
ScreenManager.Game.Exit();␍␊ |
}␍␊ |
}␍␊ |
}␍␊ |