コード例 #1
0
ファイル: PlayerManager.cs プロジェクト: draek/nibiru-engine
 /// <summary>
 /// Constructor for the player manager. Creates all four engine players.
 /// </summary>
 /// <param name="engine"></param>
 public PlayerManager(GameEngine engine)
     : base(engine)
 {
     players = new GamePlayer[4];
     players[0] = new GamePlayer(PlayerIndex.One);
     players[1] = new GamePlayer(PlayerIndex.Two);
     players[2] = new GamePlayer(PlayerIndex.Three);
     players[3] = new GamePlayer(PlayerIndex.Four);
 }
コード例 #2
0
ファイル: PlayerManager.cs プロジェクト: draek/nibiru-engine
 /// <summary>
 /// Sets the current player to the engine player described by the index provided.
 /// </summary>
 /// <param name="index">The player index to become the current player.</param>
 public void SetCurrent(PlayerIndex index)
 {
     currentPlayer = Get(index);
 }