本文整理汇总了C#中Octgn.Play.Player.UpdateSettings方法的典型用法代码示例。如果您正苦于以下问题:C# Player.UpdateSettings方法的具体用法?C# Player.UpdateSettings怎么用?C# Player.UpdateSettings使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Octgn.Play.Player
的用法示例。
在下文中一共展示了Player.UpdateSettings方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: NewPlayer
public void NewPlayer(byte id, string nick, ulong pkey, bool invertedTable, bool spectator)
{
var p = Player.FindIncludingSpectators(id);
if (p == null)
{
var player = new Player(Program.GameEngine.Definition, nick, id, pkey, spectator, false);
Program.GameMess.System("{0} has joined the game", player);
player.UpdateSettings(invertedTable, spectator);
if (Program.InPreGame == false)
{
GameStateReq(player);
if (player.Spectator == false)
{
Program.GameEngine.EventProxy.OnPlayerConnect_3_1_0_1(player);
Program.GameEngine.EventProxy.OnPlayerConnected_3_1_0_2(player);
}
}
else
{
if (Octgn.Core.Prefs.SoundOption == Core.Prefs.SoundType.DingDong)
Sounds.PlaySound(Properties.Resources.userjoinsroom, false);
else if (Octgn.Core.Prefs.SoundOption == Core.Prefs.SoundType.KnockKnock)
Sounds.PlaySound(Properties.Resources.knockknock, false);
}
}
else
{
if (p.Spectator == false && Program.InPreGame == false)
{
Program.GameEngine.EventProxy.OnPlayerConnect_3_1_0_1(p);
Program.GameEngine.EventProxy.OnPlayerConnected_3_1_0_2(p);
}
}
}
示例2: PlayerSettings
public void PlayerSettings(Player player, bool invertedTable, bool spectator)
{
player.UpdateSettings(invertedTable, spectator);
Player.RefreshSpectators();
}