本文整理汇总了C#中GameManager.beginningOfSessionActions方法的典型用法代码示例。如果您正苦于以下问题:C# GameManager.beginningOfSessionActions方法的具体用法?C# GameManager.beginningOfSessionActions怎么用?C# GameManager.beginningOfSessionActions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GameManager
的用法示例。
在下文中一共展示了GameManager.beginningOfSessionActions方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: receiveMessage
//.........这里部分代码省略.........
}
else
*/
{
//Increase the number of ready players
// numOfReadyPlayers++;
//inform all that the player is ready
// host.sendMessageToAll("#" + nickname + " is ready.");
//if all players are ready, then initialise the GameManager
if (players.Exists(x => x.isReady == false) == false)
{
//Do not accept any more players
host.acceptClient = false;
logger.Info("All players have hit Ready. Game is starting now with {0} AI players", players.Where(x => x.isAI == true).Count());
gameManager = new GameManager(this, players);
//S[n], n = number of players in this game
string strCreateUIMsg = string.Format("StrtGame&PlayerCount={0}&PlayerNames=", gameManager.player.Count);
foreach (Player p in gameManager.player.Values)
{
strCreateUIMsg += string.Format("{0},", p.nickname);
}
SendMessageToAll(strCreateUIMsg.TrimEnd(','));
//set up the game, send information on boards to players, etc.
gameManager.beginningOfSessionActions();
//set the number of countdowns finished
//numOfCountdownsFinished = 0;
gameManager.updateAllGameUI();
}
}
}
//m: game mode options
//changed by TableUI
else if (message.StartsWith("Expansion"))
{
string whichExpansion = message.Substring(10);
if (whichExpansion.StartsWith("Leaders"))
{
leadersEnabled = whichExpansion.Substring(8) == "True";
host.sendMessageToAll(string.Format("ChngMode&Leaders={0}", leadersEnabled));
}
else if (whichExpansion.StartsWith("Cities"))
{
citiesEnabled = whichExpansion.Substring(7) == "True";
host.sendMessageToAll(string.Format("ChngMode&Cities={0}", citiesEnabled));
}
}
#if FALSE
//r: all player's countdowns are
//tell the GameManager to update each player's game UI
else if (message[0] == 'r')
{
//increase the number of players with countdowns finished
numOfCountdownsFinished++;
//everyone's countdown is finished