本文整理汇总了C#中GameBoard.getNumSquaresX方法的典型用法代码示例。如果您正苦于以下问题:C# GameBoard.getNumSquaresX方法的具体用法?C# GameBoard.getNumSquaresX怎么用?C# GameBoard.getNumSquaresX使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GameBoard
的用法示例。
在下文中一共展示了GameBoard.getNumSquaresX方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Initialize
public void Initialize()
{
gameOverPosition.X = 320;
gameOverPosition.Y = 130;
device = graphics.GraphicsDevice;
gameState = new GameState();
gameStart = new GameStart(device.PresentationParameters.BackBufferWidth, device.PresentationParameters.BackBufferHeight);
gameState.setState(GameState.state.Start);
board = new GameBoard(new Vector2(33, 25), new Vector2(device.PresentationParameters.BackBufferWidth, device.PresentationParameters.BackBufferHeight));
darwin = new Darwin(board);
//firstZombie = new Zombie(10, 10, 15, 5, 15, 5, board);
//secondZombie = new Zombie(10, 16, 15, 5, 15, 5, board);
//thirdZombie = new Zombie(12, 10, 15, 5, 15, 5, board);
Vector2[] myPath = new Vector2[4];
myPath[0] = new Vector2(8, 4);
myPath[1] = new Vector2(8, 19);
myPath[2] = new Vector2(25, 19);
myPath[3] = new Vector2(25, 4);
leaderZombie = new CongaLeaderZombie(8, 4, board.getNumSquaresX(), 0, board.getNumSquaresY(), 0, myPath, darwin, board);
followerZombies = new List<CongaFollowerZombie>();
// all conga paths for the different conga zombies are created here along with all conga zombies
myPath = new Vector2[8];
myPath[0] = new Vector2(8,4);
myPath[1] = new Vector2(8, 12);
myPath[2] = new Vector2(8,19);
myPath[3] = new Vector2(17, 19);
myPath[4] = new Vector2(25,19);
myPath[5] = new Vector2(25, 12);
myPath[6] = new Vector2(25,4);
myPath[7] = new Vector2(17, 4);
followerZombies.Add(new CongaFollowerZombie(10,4,board.getNumSquaresX(),0,board.getNumSquaresY(),0,myPath,leaderZombie,darwin,board));
followerZombies.Add(new CongaFollowerZombie(12, 4, board.getNumSquaresX(), 0, board.getNumSquaresY(), 0, myPath, leaderZombie,darwin, board));
followerZombies.Add(new CongaFollowerZombie(14, 4, board.getNumSquaresX(), 0, board.getNumSquaresY(), 0, myPath, leaderZombie,darwin, board));
myPath = new Vector2[8];
myPath[2] = new Vector2(8, 4);
myPath[3] = new Vector2(8, 12);
myPath[4] = new Vector2(8, 19);
myPath[5] = new Vector2(17, 19);
myPath[6] = new Vector2(25, 19);
myPath[7] = new Vector2(25, 12);
myPath[0] = new Vector2(25, 4);
myPath[1] = new Vector2(17, 4);
followerZombies.Add(new CongaFollowerZombie(25, 8, board.getNumSquaresX(), 0, board.getNumSquaresY(), 0, myPath,leaderZombie, darwin, board));
followerZombies.Add(new CongaFollowerZombie(25, 10, board.getNumSquaresX(), 0, board.getNumSquaresY(), 0, myPath,leaderZombie, darwin, board));
followerZombies.Add(new CongaFollowerZombie(25, 14, board.getNumSquaresX(), 0, board.getNumSquaresY(), 0, myPath,leaderZombie, darwin, board));
myPath = new Vector2[8];
myPath[4] = new Vector2(8, 4);
myPath[5] = new Vector2(8, 12);
myPath[6] = new Vector2(8, 19);
myPath[7] = new Vector2(17, 19);
myPath[0] = new Vector2(25, 19);
myPath[1] = new Vector2(25, 12);
myPath[2] = new Vector2(25, 4);
myPath[3] = new Vector2(17, 4);
followerZombies.Add(new CongaFollowerZombie(22, 19, board.getNumSquaresX(), 0, board.getNumSquaresY(), 0, myPath,leaderZombie, darwin, board));
followerZombies.Add(new CongaFollowerZombie(16, 19, board.getNumSquaresX(), 0, board.getNumSquaresY(), 0, myPath,leaderZombie, darwin, board));
followerZombies.Add(new CongaFollowerZombie(14, 19, board.getNumSquaresX(), 0, board.getNumSquaresY(), 0, myPath,leaderZombie, darwin, board));
myPath = new Vector2[8];
myPath[6] = new Vector2(8, 4);
myPath[7] = new Vector2(8, 12);
myPath[0] = new Vector2(8, 19);
myPath[1] = new Vector2(17, 19);
myPath[2] = new Vector2(25, 19);
myPath[3] = new Vector2(25, 12);
myPath[4] = new Vector2(25, 4);
myPath[5] = new Vector2(17, 4);
followerZombies.Add(new CongaFollowerZombie(8, 12, board.getNumSquaresX(), 0, board.getNumSquaresY(), 0, myPath,leaderZombie, darwin, board));
followerZombies.Add(new CongaFollowerZombie(8, 15, board.getNumSquaresX(), 0, board.getNumSquaresY(), 0, myPath,leaderZombie, darwin, board));
myPath = new Vector2[8];
myPath[3] = new Vector2(8, 4);
myPath[4] = new Vector2(8, 12);
myPath[5] = new Vector2(8, 19);
myPath[6] = new Vector2(17, 19);
myPath[7] = new Vector2(25, 19);
myPath[0] = new Vector2(25, 16);
myPath[1] = new Vector2(25, 4);
myPath[2] = new Vector2(17, 4);
followerZombies.Add(new CongaFollowerZombie(29, 17, board.getNumSquaresX(), 0, board.getNumSquaresY(), 0, myPath,leaderZombie, darwin, board));
followerZombies.Add(new CongaFollowerZombie(29, 15, board.getNumSquaresX(), 0, board.getNumSquaresY(), 0, myPath,leaderZombie, darwin, board));
followerZombies.Add(new CongaFollowerZombie(29, 16, board.getNumSquaresX(), 0, board.getNumSquaresY(), 0, myPath,leaderZombie, darwin, board));
followerZombies.Add(new CongaFollowerZombie(29, 13, board.getNumSquaresX(), 0, board.getNumSquaresY(), 0, myPath,leaderZombie, darwin, board));
myPath = new Vector2[8];
//.........这里部分代码省略.........