本文整理汇总了C#中GameStateManagement.PlayerIndexEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# PlayerIndexEventArgs类的具体用法?C# PlayerIndexEventArgs怎么用?C# PlayerIndexEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PlayerIndexEventArgs类属于GameStateManagement命名空间,在下文中一共展示了PlayerIndexEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: ControlsMenuEntrySelected
void ControlsMenuEntrySelected(object sender, PlayerIndexEventArgs e)
{
if (e.PlayerIndex == ControllingPlayer)
{
ScreenManager.AddScreen(new ControlsScreen(), ControllingPlayer);
}
}
开发者ID:kmatzen,项目名称:EECS-494-Final-Project,代码行数:7,代码来源:MainMenuScreen.cs
示例2: PlayGameMenuEntrySelected
void PlayGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
{
List<GameScreen> screensToLoad = new List<GameScreen>();
screensToLoad.Add(new GameplayScreen(leveli));
//screensToLoad.Add(new TowerScreen(5));
LoadingScreen.Load(ScreenManager, true, e.PlayerIndex, screensToLoad.ToArray());
}
开发者ID:Zaldroc,项目名称:TowerDefense,代码行数:7,代码来源:GameOverMenuScreen.cs
示例3: AvailableSessionMenuEntrySelected
/// <summary>
/// Event handler for when an available session menu entry is selected.
/// </summary>
void AvailableSessionMenuEntrySelected(object sender, PlayerIndexEventArgs e)
{
// Which menu entry was selected?
AvailableSessionMenuEntry menuEntry = (AvailableSessionMenuEntry)sender;
AvailableNetworkSession availableSession = menuEntry.AvailableSession;
try
{
// Begin an asynchronous join network session operation.
IAsyncResult asyncResult = NetworkSession.BeginJoin(availableSession,
null, null);
// Activate the network busy screen, which will display
// an animation until this operation has completed.
NetworkBusyScreen busyScreen = new NetworkBusyScreen(asyncResult);
busyScreen.OperationCompleted += JoinSessionOperationCompleted;
ScreenManager.AddScreen(busyScreen, ControllingPlayer);
}
catch (Exception exception)
{
NetworkErrorScreen errorScreen = new NetworkErrorScreen(exception);
ScreenManager.AddScreen(errorScreen, ControllingPlayer);
}
}
开发者ID:Nailz,项目名称:MonoGame-Samples,代码行数:30,代码来源:JoinSessionScreen.cs
示例4: PlayGameMenuEntrySelected
/// <summary>
/// Event handler for when the Play Game menu entry is selected.
/// </summary>
void PlayGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
{
// Tell all the current screens to transition off.
foreach (GameScreen screen in ScreenManager.GetScreens())
screen.ExitScreen();
ScreenManager.AddScreen(new GameplayScreen(), e.PlayerIndex);
}
开发者ID:Clancey,项目名称:BMX_MonoGame,代码行数:11,代码来源:MainMenuScreen.cs
示例5: hardMenuEntrySelected
/// <summary>
/// Event handler for when the Hard menu entry is selected.
/// </summary>
void hardMenuEntrySelected(object sender, PlayerIndexEventArgs e)
{
if (ControllingPlayer == e.PlayerIndex)
{
NarlyGame.difficulty = NarlyGame.Difficulty.Hard;
LoadingScreen.Load(ScreenManager, true, ControllingPlayer,
new GameplayScreen(song));
}
}
开发者ID:kmatzen,项目名称:EECS-494-Final-Project,代码行数:12,代码来源:DifficultyMenuScreen.cs
示例6: HighScoresEntrySelected
/// <summary>
/// Event handler for when the Play Game menu entry is selected.
/// </summary>
void HighScoresEntrySelected(object sender, PlayerIndexEventArgs e)
{
//LoadingScreen.Load(ScreenManager, true, e.PlayerIndex,
// new GameplayScreen());
if (e.PlayerIndex == ControllingPlayer)
{
ScreenManager.AddScreen(new HighScoreScreen(), ControllingPlayer);
}
}
开发者ID:kmatzen,项目名称:EECS-494-Final-Project,代码行数:12,代码来源:MainMenuScreen.cs
示例7: player_Selected
void player_Selected(object sender, PlayerIndexEventArgs e)
{
//this is the correct way
//towersmash.players[(int)e.PlayerIndex] = !towersmash.players[(int)e.PlayerIndex];
//need to be able to test out code solo, this is broken code to be used only for testing
towersmash.players[i] = true;
i++;
SetText();
}
开发者ID:danielselnick,项目名称:Sentry-Smash,代码行数:9,代码来源:playerjoin.cs
示例8: SoundMenuEntrySelected
private void SoundMenuEntrySelected(object sender, PlayerIndexEventArgs e)
{
_soundVolme++;
if (_soundVolme > 10)
_soundVolme = 0;
MediaPlayer.Volume = (float) _soundVolme/10;
SetMenuEntryText();
}
开发者ID:nXqd,项目名称:XNAGame,代码行数:10,代码来源:OptionsMenuScreen.cs
示例9: QuitGameMenuEntrySelected
/// <summary>
/// Event handler for when the Quit Game menu entry is selected.
/// </summary>
void QuitGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
{
const string message = "Are you sure you want to quit this game?";
MessageBoxScreen confirmQuitMessageBox = new MessageBoxScreen(message);
confirmQuitMessageBox.Accepted += ConfirmQuitMessageBoxAccepted;
ScreenManager.AddScreen(confirmQuitMessageBox, ControllingPlayer);
}
开发者ID:ITSDSSA,项目名称:GameStateManagement,代码行数:13,代码来源:PauseMenuScreen.cs
示例10: PlayMenuEntrySelected
/// <summary>
/// Event handler for when the Play Game menu entry is selected.
/// </summary>
void PlayMenuEntrySelected(object sender, PlayerIndexEventArgs e)
{
const string message = "PlayBack Functionality is not implemented yet.";
MessageBoxScreen playMessageBox = new MessageBoxScreen(message);
playMessageBox.Accepted += PlayMessageBoxAccepted;
ScreenManager.AddScreen(playMessageBox, e.PlayerIndex);
// LoadingScreen.Load(ScreenManager, true, e.PlayerIndex,
// new GameplayScreen());
}
开发者ID:dcordoba,项目名称:Imagination-Labs,代码行数:14,代码来源:SlideMenuScreen.cs
示例11: easyMenuEntrySelected
/// <summary>
/// Event handler for when the Easy menu entry is selected.
/// </summary>
void easyMenuEntrySelected(object sender, PlayerIndexEventArgs e)
{
if (e.PlayerIndex == ControllingPlayer)
{
NarlyGame.difficulty = NarlyGame.Difficulty.Easy;
//ScreenManager.AddScreen(new SongSelectionScreen(), e.PlayerIndex);
LoadingScreen.Load(ScreenManager, true, ControllingPlayer,
new GameplayScreen(song));
}
}
开发者ID:kmatzen,项目名称:EECS-494-Final-Project,代码行数:14,代码来源:DifficultyMenuScreen.cs
示例12: ConfirmQuitMessageBoxAccepted
/// <summary>
/// Event handler for when the user selects ok on the "are you sure
/// you want to quit" message box. This uses the loading screen to
/// transition from the game back to the main menu screen.
/// </summary>
void ConfirmQuitMessageBoxAccepted(object sender, PlayerIndexEventArgs e)
{
Screen[] screens = ScreenManager.GetScreens();
foreach (Screen screen in screens)
{
if (screen is PinEditScreen)
{
ScreenManager.RemoveScreen(screen);
}
}
ScreenManager.AddScreen(new PhotoSetMenuScreen(), null);
this.ExitScreen();
}
开发者ID:VincentBLortie,项目名称:Virtual-Anatomy-Lab,代码行数:18,代码来源:PauseMenuScreen.cs
示例13: saveEntry_Selected
void saveEntry_Selected(object sender, PlayerIndexEventArgs e)
{
Screen[] screens = ScreenManager.GetScreens();
foreach (Screen screen in screens)
{
if (screen is PinEditScreen)
{
((PinEditScreen)screen).SavePins();
}
}
OnCancel(sender, e);
}
开发者ID:VincentBLortie,项目名称:Virtual-Anatomy-Lab,代码行数:13,代码来源:PauseMenuScreen.cs
示例14: start_Selected
void start_Selected(object sender, PlayerIndexEventArgs e)
{
towersmash.updatenumberofplayers();
//if (counter > 1)
{
base.OnCancel(sender, e);
LoadingScreen.Load(ScreenManager, true, e.PlayerIndex, new pvp(ScreenManager));
}
//else
//{
// MessageBoxScreen messagebox = new MessageBoxScreen("Must have at least 2 players ready for battle!");
// ScreenManager.AddScreen(messagebox, null);
//}
}
开发者ID:danielselnick,项目名称:Sentry-Smash,代码行数:14,代码来源:playerjoin.cs
示例15: exitMenuEntrySelected
void exitMenuEntrySelected(object sender, PlayerIndexEventArgs e)
{
if (!(this.keyboardEnabled || this.kinectEnabled))
{
QuestionMenuScreen question = new QuestionMenuScreen("At least one input must be enabled.", new string[] { "Ok" });
ScreenManager.AddScreen(question, null);
}
else
{
ProgramSettings.ChangeSetting(Setting.KeyboardEnabled, this.keyboardEnabled.ToString());
ProgramSettings.ChangeSetting(Setting.KinectEnabled, this.kinectEnabled.ToString());
this.ExitScreen();
}
}
开发者ID:VincentBLortie,项目名称:Virtual-Anatomy-Lab,代码行数:15,代码来源:InputMenuScreen.cs
示例16: dissectionRotationMenuEntrySelected
void dissectionRotationMenuEntrySelected(object sender, PlayerIndexEventArgs e)
{
QuestionMenuScreen questionMenu = new QuestionMenuScreen("Dissection rotations should be", new string[] { DissectionStepSize.Slow.ToString(), DissectionStepSize.Medium.ToString(), DissectionStepSize.Fast.ToString(), "Back" });
questionMenu.OptionSelected += new OptionSelectedEventHandler(dissectionRotationQuestionMenuOptionSelected);
ScreenManager.AddScreen(questionMenu, null);
}
开发者ID:VincentBLortie,项目名称:Virtual-Anatomy-Lab,代码行数:6,代码来源:OptionsMenuScreen.cs
示例17: SelectLevelEntrySelected
/// <summary>
/// Event handler for when the levelSelector entry is selected
/// </summary>
void SelectLevelEntrySelected(object sender, PlayerIndexEventArgs e)
{
LoadingScreen.Load(ScreenManager, true, e.PlayerIndex,
new MenuBackgroundScreen("LevelSelectionIcons_SD//LevelSelectionBackground1_SD"),
new LevelSelector());
}
开发者ID:skakri09,项目名称:WinPhone-menuSystem,代码行数:9,代码来源:MainMenuScreen.cs
示例18: PlayGameMenuEntrySelected
/// <summary>
/// Event handler for when the Play Game menu entry is selected.
/// </summary>
void PlayGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
{
LoadingScreen.Load(ScreenManager, true, e.PlayerIndex,
new GameplayScreen());
}
开发者ID:skakri09,项目名称:WinPhone-menuSystem,代码行数:8,代码来源:MainMenuScreen.cs
示例19: OptionsMenuEntrySelected
/// <summary>
/// Event handler for when the Options menu entry is selected.
/// </summary>
void OptionsMenuEntrySelected(object sender, PlayerIndexEventArgs e)
{
ScreenManager.AddScreen(new OptionsMenuScreen(), e.PlayerIndex);
}
开发者ID:skakri09,项目名称:WinPhone-menuSystem,代码行数:7,代码来源:MainMenuScreen.cs
示例20: ConfirmExitMessageBoxAccepted
/// <summary>
/// Event handler for when the user selects ok on the "are you sure
/// you want to exit" message box.
/// </summary>
void ConfirmExitMessageBoxAccepted(object sender, PlayerIndexEventArgs e)
{
ScreenManager.Game.Exit();
}
开发者ID:BGCX261,项目名称:zombiesmash-svn-to-git,代码行数:8,代码来源:MainMenuScreen.cs
注:本文中的GameStateManagement.PlayerIndexEventArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论