本文整理汇总了C#中Circuit.setCurrent方法的典型用法代码示例。如果您正苦于以下问题:C# Circuit.setCurrent方法的具体用法?C# Circuit.setCurrent怎么用?C# Circuit.setCurrent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Circuit
的用法示例。
在下文中一共展示了Circuit.setCurrent方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Load
//.........这里部分代码省略.........
{
baricades.Add(b);
}
}
else if (r.Name.ToLower() == "lowrowsquare")
{
LowRowSquare s = new LowRowSquare(board);
if (s.readElement(r))
{
insertInto(s.Id, s);
}
}
else if (r.Name.ToLower() == "connector")
{
Connector s = new Connector(board);
if (s.readElement(r))
{
insertInto(s.Id, s);
connectors.Add(s);
}
}
else if (r.Name.ToLower() == "player")
{
Player p = new Player(playerList);
if (p.readElement(r))
{
_numberofPlayers++;
_numberOfHumanPlayers++;
p.PlayerSquare = (PlayerSquare)linkList[find(p.PlayerSquareId)];
p.PlayerId = playerList.Count + 1;
playerList.Add(p);
}
}
else if (r.Name.ToLower() == "aiplayer")
{
AIPlayer p = new AIPlayer(playerList);
if (p.readElement(r))
{
_numberOfAIPlayers++;
_numberOfHumanPlayers++;
p.PlayerSquare = (PlayerSquare)linkList[find(p.PlayerSquareId)];
p.PlayerId = playerList.Count + 1;
playerList.Add(p);
}
}
else if (r.Name.ToLower() == "finishsquare")
{
FinishSquare s = new FinishSquare(board);
if (s.readElement(r))
{
f = s;
insertInto(s.Id, s);
previous = s;
}
}
else if (r.Name.ToLower() == "forestsquare")
{
ForestSquare s = new ForestSquare(board);
if (s.readElement(r))
{
forest = s;
insertInto(s.Id, s);
previous = s;
}
}
else if (r.Name.ToLower() == "board")
{
Board b = new Board();
if (b.readElement(r))
{
board = b;
_numberOfPawns = board.NumberOfPawns;
}
}
}
r.Close();
link();
setPiecesToSquares();
setPawnsToPlayer();
checkPlayers();
checkPieces();
playerList.setCurrent(_currentPlayer);
setPosition(f, f.X, f.Y);
conectors();
board.Squares = linkList;
board.Baricades = baricades;
if (forest != null)
{
board.ForestSquare = forest;
}
Game game = new Game(board, playerList, f);
board.Game = game;
return game;
}