本文整理汇总了C#中MiswGame2007.GraphicsDevice.DrawImageFixFlip方法的典型用法代码示例。如果您正苦于以下问题:C# GraphicsDevice.DrawImageFixFlip方法的具体用法?C# GraphicsDevice.DrawImageFixFlip怎么用?C# GraphicsDevice.DrawImageFixFlip使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MiswGame2007.GraphicsDevice
的用法示例。
在下文中一共展示了GraphicsDevice.DrawImageFixFlip方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Draw
public override void Draw(GraphicsDevice graphics)
{
int drawX = (int)Math.Round(position.X) - game.IntCameraX;
int drawY = (int)Math.Round(position.Y) - game.IntCameraY;
if (direction == Direction.Left)
{
graphics.DrawImageFix(GameImage.Mafia, 32, 64, 0, animation, drawX, drawY, this);
}
else
{
graphics.DrawImageFixFlip(GameImage.Mafia, 32, 64, 0, animation, drawX, drawY, this);
}
}
示例2: Draw
public override void Draw(GraphicsDevice graphics)
{
int drawX = (int)Math.Round(position.X) - game.IntCameraX;
int drawY = (int)Math.Round(position.Y) - game.IntCameraY;
if (direction == Direction.Left)
{
int textureCol = animation / 2;
graphics.DrawImageFix(GameImage.Player, 32, 64, 0, textureCol, drawX, drawY, this);
}
else
{
int textureCol = animation / 2;
graphics.DrawImageFixFlip(GameImage.Player, 32, 64, 0, textureCol, drawX, drawY, this);
}
}
示例3: Draw
public override void Draw(GraphicsDevice graphics)
{
int drawX = (int)Math.Round(position.X) - game.IntCameraX;
int drawY = (int)Math.Round(position.Y) - game.IntCameraY;
if (direction == Direction.Left)
{
int textureCol = animation / 4;
if (!attacking)
{
graphics.DrawImageFix(GameImage.Kyoro, 64, 64, 0, textureCol, drawX, drawY, this);
}
else
{
if (attackCount < 8)
{
graphics.DrawImageFix(GameImage.Kyoro, 64, 64, 1, attackCount / 2, drawX, drawY, this);
}
else if (attackCount < 24)
{
graphics.DrawImageFix(GameImage.Kyoro, 64, 64, 1, 3, drawX, drawY, this);
}
else
{
graphics.DrawImageFix(GameImage.Kyoro, 64, 64, 1, 3 - (attackCount - 24) / 2, drawX, drawY, this);
}
}
}
else
{
int textureCol = animation / 4;
if (!attacking)
{
graphics.DrawImageFixFlip(GameImage.Kyoro, 64, 64, 0, textureCol, drawX, drawY, this);
}
else
{
if (attackCount < 8)
{
graphics.DrawImageFixFlip(GameImage.Kyoro, 64, 64, 1, attackCount / 2, drawX, drawY, this);
}
else if (attackCount < 24)
{
graphics.DrawImageFixFlip(GameImage.Kyoro, 64, 64, 1, 3, drawX, drawY, this);
}
else
{
graphics.DrawImageFixFlip(GameImage.Kyoro, 64, 64, 1, 3 - (attackCount - 24) / 2, drawX, drawY, this);
}
}
}
}
示例4: Draw
public override void Draw(GraphicsDevice graphics)
{
int drawX = (int)Math.Round(position.X) - game.IntCameraX;
int drawY = (int)Math.Round(position.Y) - game.IntCameraY;
if (direction == Direction.Left)
{
if (currentState == State.Run)
{
graphics.DrawImageFix(GameImage.Robot, 128, 256, 0, animation / 4, drawX, drawY, this);
}
else if (currentState == State.Attack)
{
if (attackCount < 32)
{
graphics.DrawImageFix(GameImage.Robot, 128, 256, 1, attackCount / 4, drawX, drawY, this);
}
else if (attackCount < 128)
{
graphics.DrawImageFix(GameImage.Robot, 128, 256, 1, 7, drawX, drawY, this);
}
else
{
graphics.DrawImageFix(GameImage.Robot, 128, 256, 1, 7 - (attackCount - 128) / 4, drawX, drawY, this);
}
}
else
{
if (jumpCount < 10)
{
graphics.DrawImageFix(GameImage.Robot, 128, 256, 1, jumpCount / 2, drawX, drawY, this);
}
else if (jumpCount < 16)
{
graphics.DrawImageFix(GameImage.Robot, 128, 256, 1, 4 - (jumpCount - 10) / 2, drawX, drawY, this);
}
else
{
graphics.DrawImageFix(GameImage.Robot, 128, 256, 1, 2, drawX, drawY, this);
}
}
}
else
{
if (currentState == State.Run)
{
graphics.DrawImageFixFlip(GameImage.Robot, 128, 256, 0, animation / 4, drawX, drawY, this);
}
else if (currentState == State.Attack)
{
if (attackCount < 32)
{
graphics.DrawImageFixFlip(GameImage.Robot, 128, 256, 1, attackCount / 4, drawX, drawY, this);
}
else if (attackCount < 128)
{
graphics.DrawImageFixFlip(GameImage.Robot, 128, 256, 1, 7, drawX, drawY, this);
}
else
{
graphics.DrawImageFixFlip(GameImage.Robot, 128, 256, 1, 7 - (attackCount - 128) / 4, drawX, drawY, this);
}
}
else
{
if (jumpCount < 10)
{
graphics.DrawImageFixFlip(GameImage.Robot, 128, 256, 1, jumpCount / 2, drawX, drawY, this);
}
else if (jumpCount < 16)
{
graphics.DrawImageFixFlip(GameImage.Robot, 128, 256, 1, 4 - (jumpCount - 10) / 2, drawX, drawY, this);
}
else
{
graphics.DrawImageFixFlip(GameImage.Robot, 128, 256, 1, 2, drawX, drawY, this);
}
}
}
}
示例5: Draw
public override void Draw(GraphicsDevice graphics)
{
int drawX = (int)Math.Round(position.X) - game.IntCameraX;
int drawY = (int)Math.Round(position.Y) - game.IntCameraY;
if (direction == Direction.Left)
{
int textureCol = animation / 4;
if (openCount == -1)
{
graphics.DrawImageFix(GameImage.House, 64, 64, 0, textureCol, drawX, drawY, this);
}
else
{
graphics.DrawImageFix(GameImage.House, 64, 64, 1, openCount / 2, drawX, drawY, this);
}
}
else
{
int textureCol = animation / 4;
if (openCount == -1)
{
graphics.DrawImageFixFlip(GameImage.House, 64, 64, 0, textureCol, drawX, drawY, this);
}
else
{
graphics.DrawImageFixFlip(GameImage.House, 64, 64, 1, openCount / 2, drawX, drawY, this);
}
}
}
示例6: Draw
public override void Draw(GraphicsDevice graphics)
{
int drawX = (int)Math.Round(position.X) - game.IntCameraX;
int drawY = (int)Math.Round(position.Y) - game.IntCameraY;
if (!ghost)
{
if (direction == Direction.Left)
{
if (!attacking)
{
graphics.DrawImageFix(GameImage.Norio, 128, 128, 0, 0, drawX, drawY, this);
}
else
{
if (attackCount < 32 && (attackCount / 4) % 2 == 0)
{
graphics.DrawImageFix(GameImage.Norio, 128, 128, 0, 0, drawX, drawY, this);
}
else
{
graphics.DrawImageFix(GameImage.Norio, 128, 128, 1, 0, drawX, drawY, this);
}
}
}
else
{
if (!attacking)
{
graphics.DrawImageFixFlip(GameImage.Norio, 128, 128, 0, 0, drawX, drawY, this);
}
else
{
if (attackCount < 32 && (attackCount / 4) % 2 == 0)
{
graphics.DrawImageFixFlip(GameImage.Norio, 128, 128, 0, 0, drawX, drawY, this);
}
else
{
graphics.DrawImageFixFlip(GameImage.Norio, 128, 128, 1, 0, drawX, drawY, this);
}
}
}
}
else
{
if (direction == Direction.Left)
{
if (!attacking)
{
graphics.DrawImageAlphaFix(GameImage.Norio, 128, 128, 0, 0, drawX, drawY, this, 128);
}
else
{
if (attackCount < 32 && (attackCount / 4) % 2 == 0)
{
graphics.DrawImageAlphaFix(GameImage.Norio, 128, 128, 0, 0, drawX, drawY, this, 128);
}
else
{
graphics.DrawImageAlphaFix(GameImage.Norio, 128, 128, 1, 0, drawX, drawY, this, 128);
}
}
}
else
{
if (!attacking)
{
graphics.DrawImageAlphaFixFlip(GameImage.Norio, 128, 128, 0, 0, drawX, drawY, this, 128);
}
else
{
if (attackCount < 32 && (attackCount / 4) % 2 == 0)
{
graphics.DrawImageAlphaFixFlip(GameImage.Norio, 128, 128, 0, 0, drawX, drawY, this, 128);
}
else
{
graphics.DrawImageAlphaFixFlip(GameImage.Norio, 128, 128, 1, 0, drawX, drawY, this, 128);
}
}
}
}
}
示例7: Draw
public override void Draw(GraphicsDevice graphics)
{
int drawX = (int)Math.Round(position.X) - game.IntCameraX;
int drawY = (int)Math.Round(position.Y) - game.IntCameraY;
int textureCol = 3;
if (stateCount < 16)
{
textureCol = stateCount / 4;
}
if (flipAnimation)
{
textureCol = 3 - textureCol;
}
if (direction == Direction.Left)
{
graphics.DrawImageFix(GameImage.Skater, 96, 96, 0, textureCol, drawX, drawY, this);
}
else
{
graphics.DrawImageFixFlip(GameImage.Skater, 96, 96, 0, textureCol, drawX, drawY, this);
}
}
示例8: DrawSpin
private void DrawSpin(GraphicsDevice graphics, int animation)
{
int drawX = (int)Math.Round(position.X) - game.IntCameraX;
int drawY = (int)Math.Round(position.Y) - game.IntCameraY;
int rotate = animation % 16;
if (rotate < 8)
{
graphics.DrawImageFix(GameImage.Father, 128, 256, 1, rotate, drawX, drawY, this);
}
else
{
graphics.DrawImageFixFlip(GameImage.Father, 128, 256, 1, 15 - rotate, drawX, drawY, this);
}
}
示例9: Draw
public override void Draw(GraphicsDevice graphics)
{
int drawX = (int)Math.Round(position.X) - game.IntCameraX;
int drawY = (int)Math.Round(position.Y) - game.IntCameraY;
if (direction == Direction.Left)
{
if (!attacking)
{
graphics.DrawImageFix(GameImage.BlackPlayer, 32, 64, 0, animation / 2, drawX, drawY, this);
}
else
{
graphics.DrawImageFix(GameImage.BlackPlayer, 32, 64, 1, fireAnimation, drawX, drawY, this);
}
}
else
{
if (!attacking)
{
graphics.DrawImageFixFlip(GameImage.BlackPlayer, 32, 64, 0, animation / 2, drawX, drawY, this);
}
else
{
graphics.DrawImageFixFlip(GameImage.BlackPlayer, 32, 64, 1, fireAnimation, drawX, drawY, this);
}
}
}
示例10: Draw
public override void Draw(GraphicsDevice graphics)
{
int drawX = (int)Math.Round(position.X) - game.IntCameraX;
int drawY = (int)Math.Round(position.Y) - game.IntCameraY;
int textureCol = animation / 2;
switch (currentState)
{
case State.Rise:
if (direction == Direction.Left)
{
graphics.DrawImageFix(GameImage.Mushroom, 32, 32, 0, textureCol, drawX, drawY, this);
}
else
{
graphics.DrawImageFixFlip(GameImage.Mushroom, 32, 32, 0, textureCol, drawX, drawY, this);
}
break;
case State.Wait:
if (direction == Direction.Left)
{
graphics.DrawImageFix(GameImage.Mushroom, 32, 32, 0, 7, drawX, drawY, this);
}
else
{
graphics.DrawImageFixFlip(GameImage.Mushroom, 32, 32, 0, 7, drawX, drawY, this);
}
break;
case State.Attack:
graphics.DrawImageRotate(GameImage.Mushroom, 32, 32, 1, textureCol, drawX + 16, drawY + 16, 16, 16, (int)Math.Round(angle));
break;
}
}
示例11: Draw
public override void Draw(GraphicsDevice graphics)
{
int drawX = (int)Math.Round(position.X) - game.IntCameraX;
int drawY = (int)Math.Round(position.Y) - game.IntCameraY;
int textureRow = 0;
int textureCol = animation / 2;
if (direction == Direction.Left)
{
if (!attackJump)
{
graphics.DrawImageFix(GameImage.Babo, 64, 64, textureRow, textureCol, drawX, drawY, this);
}
else
{
graphics.DrawImageFix(GameImage.Babo, 64, 64, textureRow + 1, textureCol, drawX, drawY, this);
}
}
else
{
if (!attackJump)
{
graphics.DrawImageFixFlip(GameImage.Babo, 64, 64, textureRow, textureCol, drawX, drawY, this);
}
else
{
graphics.DrawImageFixFlip(GameImage.Babo, 64, 64, textureRow + 1, textureCol, drawX, drawY, this);
}
}
}
示例12: Draw
public override void Draw(GraphicsDevice graphics)
{
int drawX = (int)Math.Round(position.X) - game.IntCameraX;
int drawY = (int)Math.Round(position.Y) - game.IntCameraY;
int textureCol = animation / 2;
if (direction == Direction.Left)
{
if (currentState != State.Attack)
{
graphics.DrawImageFix(GameImage.Baaka, 96, 96, 0, textureCol, drawX, drawY, this);
}
else
{
graphics.DrawImageFix(GameImage.Baaka, 96, 96, 0, 8, drawX, drawY, this);
}
}
else
{
if (currentState != State.Attack)
{
graphics.DrawImageFixFlip(GameImage.Baaka, 96, 96, 0, textureCol, drawX, drawY, this);
}
else
{
graphics.DrawImageFixFlip(GameImage.Baaka, 96, 96, 0, 8, drawX, drawY, this);
}
}
}
示例13: Draw
public override void Draw(GraphicsDevice graphics)
{
if (!visible) return;
int drawX = (int)Math.Round(position.X) - game.IntCameraX;
int drawY = (int)Math.Round(position.Y) - game.IntCameraY;
int textureRow = 0;
int textureCol = animation / 2;
if (direction == Direction.Left)
{
graphics.DrawImageFix(GameImage.Player, 32, 64, textureRow, textureCol, drawX, drawY, this);
if (fireCount == -1)
{
graphics.DrawImageFix(GameImage.Player, 32, 64, textureRow, textureCol + 8, drawX, drawY, this);
}
else
{
if (armAnimation < 8)
{
switch (arm)
{
case ArmDirection.Forward:
graphics.DrawImageFix(GameImage.Player, 32, 64, textureRow + 1, armAnimation + 8, drawX, drawY, this);
break;
case ArmDirection.Upper:
graphics.DrawImageFix(GameImage.Player, 32, 64, textureRow + 2, armAnimation + 8, drawX, drawY, this);
break;
case ArmDirection.Lower:
graphics.DrawImageFix(GameImage.Player, 32, 64, textureRow + 3, armAnimation + 8, drawX, drawY, this);
break;
}
}
else
{
switch (arm)
{
case ArmDirection.Forward:
graphics.DrawImageFix(GameImage.Player, 32, 64, textureRow + 1, 15 - armAnimation + 8, drawX, drawY, this);
break;
case ArmDirection.Upper:
graphics.DrawImageFix(GameImage.Player, 32, 64, textureRow + 2, 15 - armAnimation + 8, drawX, drawY, this);
break;
case ArmDirection.Lower:
graphics.DrawImageFix(GameImage.Player, 32, 64, textureRow + 3, 15 - armAnimation + 8, drawX, drawY, this);
break;
}
}
}
}
else
{
graphics.DrawImageFixFlip(GameImage.Player, 32, 64, textureRow, textureCol, drawX, drawY, this);
if (fireCount == -1)
{
graphics.DrawImageFixFlip(GameImage.Player, 32, 64, textureRow, textureCol + 8, drawX, drawY, this);
}
else
{
if (armAnimation < 8)
{
switch (arm)
{
case ArmDirection.Forward:
graphics.DrawImageFixFlip(GameImage.Player, 32, 64, textureRow + 1, armAnimation + 8, drawX, drawY, this);
break;
case ArmDirection.Upper:
graphics.DrawImageFixFlip(GameImage.Player, 32, 64, textureRow + 2, armAnimation + 8, drawX, drawY, this);
break;
case ArmDirection.Lower:
graphics.DrawImageFixFlip(GameImage.Player, 32, 64, textureRow + 3, armAnimation + 8, drawX, drawY, this);
break;
}
}
else
{
switch (arm)
{
case ArmDirection.Forward:
graphics.DrawImageFixFlip(GameImage.Player, 32, 64, textureRow + 1, 15 - armAnimation + 8, drawX, drawY, this);
break;
case ArmDirection.Upper:
graphics.DrawImageFixFlip(GameImage.Player, 32, 64, textureRow + 2, 15 - armAnimation + 8, drawX, drawY, this);
break;
case ArmDirection.Lower:
graphics.DrawImageFixFlip(GameImage.Player, 32, 64, textureRow + 3, 15 - armAnimation + 8, drawX, drawY, this);
break;
}
}
}
}
}