本文整理汇总了C#中BitSits_Framework.PlayerIndexEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# PlayerIndexEventArgs类的具体用法?C# PlayerIndexEventArgs怎么用?C# PlayerIndexEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PlayerIndexEventArgs类属于BitSits_Framework命名空间,在下文中一共展示了PlayerIndexEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PlayGameMenuEntrySelected
/// <summary>
/// Event handler for when the Play Game menu entry is selected.
/// </summary>
void PlayGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
{
BitSitsGames.ScoreData.Level = BitSitsGames.ScoreData.Score = 0;
LoadingScreen.Load(ScreenManager, false, e.PlayerIndex,
new GameplayScreen(), new PauseMenuScreen());
}
示例2: NewGameMenuEntrySelected
/// <summary>
/// Event handler for when the Play Game menu entry is selected.
/// </summary>
void NewGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
{
BitSitsGames.ScoreData.CurrentLevel = 0;
BitSitsGames.ScoreData.PrevScore = 0;
LoadingScreen.Load(ScreenManager, false, e.PlayerIndex,
new GameplayScreen());
}
示例3: MusicMenuEntrySelected
void MusicMenuEntrySelected(object sender, PlayerIndexEventArgs e)
{
BitSitsGames.Settings.MusicEnabled = !BitSitsGames.Settings.MusicEnabled;
if (BitSitsGames.Settings.MusicEnabled) ScreenManager.GameContent.PlayMusic();
else MediaPlayer.Pause();
SetMenuEntryText();
}
示例4: SoundEntrySelected
/// <summary>
/// Event handler for when the Resolution menu entry is selected.
/// </summary>
void SoundEntrySelected(object sender, PlayerIndexEventArgs e)
{
BitSitsGames.Settings.SoundEnabled = !BitSitsGames.Settings.SoundEnabled;
if (BitSitsGames.Settings.SoundEnabled) SoundEffect.MasterVolume = 1;
else SoundEffect.MasterVolume = 0;
SetMenuEntryText();
}
示例5: QuitMenuEntrySelected
/// <summary>
/// Event handler for when the Quit Game menu entry is selected.
/// </summary>
void QuitMenuEntrySelected(object sender, PlayerIndexEventArgs e)
{
if (screen is GameplayScreen)
LoadingScreen.Load(ScreenManager, false, null, new BackgroundScreen(), new MainMenuScreen(),
new LevelMenuScreen());
if (screen is LabScreen)
LoadingScreen.Load(ScreenManager, false, null, new BackgroundScreen(), new MainMenuScreen());
}
示例6: IsFullScreenMenuEntrySelected
/// <summary>
/// Event handler for when the Frobnicate menu entry is selected.
/// </summary>
void IsFullScreenMenuEntrySelected(object sender, PlayerIndexEventArgs e)
{
BitSitsGames.Settings.IsFullScreen = !BitSitsGames.Settings.IsFullScreen;
ScreenManager.GraphicsDeviceManager.IsFullScreen = BitSitsGames.Settings.IsFullScreen;
ScreenManager.GraphicsDeviceManager.ApplyChanges();
SetMenuEntryText();
}
示例7: LoadLevelMenuEntrySelected
void LoadLevelMenuEntrySelected(object sender, PlayerIndexEventArgs e)
{
int i = (int)((MenuEntry)sender).UserData;
#if !DEBUG
if (i > BitSitsGames.ScoreData.CurrentLevel) return;
#endif
ScreenManager.GameContent.levelIndex = i;
LoadingScreen.Load(ScreenManager, false, e.PlayerIndex, new GameplayScreen());
}
示例8: MessageBoxAccepted
void MessageBoxAccepted(object sender, PlayerIndexEventArgs e)
{
if (level.IsLevelUp)
LoadingScreen.Load(ScreenManager, false, null, new BackgroundScreen(), new MainMenuScreen(),
new LevelMenuScreen());
else if (level.ReloadLevel) ReloadCurrentLevel();
}
示例9: GameOverAccepted
void GameOverAccepted(object sender, PlayerIndexEventArgs e)
{
LoadingScreen.Load(ScreenManager, false, null, new BackgroundScreen(), new MainMenuScreen());
}
示例10: LabSetupMenuEntrySelected
void LabSetupMenuEntrySelected(object sender, PlayerIndexEventArgs e)
{
LoadingScreen.Load(ScreenManager, false, e.PlayerIndex, new LabScreen());
}
示例11: PlayGameMenuEntrySelected
/// <summary>
/// Event handler for when the Play Game menu entry is selected.
/// </summary>
void PlayGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
{
ScreenManager.AddScreen(new LevelMenuScreen(), e.PlayerIndex);
}
示例12: AddEqipment
public void AddEqipment(object sender, PlayerIndexEventArgs ea)
{
EquipmentName en = EquipmentName.beaker;
if (((MenuEntry)sender).UserData is EquipmentName)
en = ((EquipmentName)((MenuEntry)sender).UserData);
else return;
Equipment e = new Equipment(en, gameContent, world);
e.body.Position = camera.Position / gameContent.scale;
if (selectedEq != null)
{
selectedEq.isSelected = false; selectedEq.SetMode(editMode, false); selectedEq = null;
}
selectedEq = e; selectedEq.isSelected = true; selectedEq.SetMode(editMode, false);
equipmentAdded = true;
if (equipments.Count == 0) equipments.Add(e);
else
{
for (int i = 0; i < equipments.Count; i++)
if (e.equipName <= equipments[i].equipName)
{
equipments.Insert(i, e); return;
}
equipments.Add(e);
}
}
示例13: NewGameMenuEntrySelected
void NewGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
{
BitSitsGames.ScoreData.LoadDefault(GameContent.MaxLevelIndex);
PlayGameMenuEntrySelected(sender, e);
}
示例14: ClampEquipment
public void ClampEquipment(object sender, PlayerIndexEventArgs e)
{
if (selectedEq != null)
{
selectedEq.isSelected = false;
selectedEq.isClamped = true; selectedEq.SetMode(editMode, false);
selectedEq = null;
}
}
示例15: 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();
}