Example #1
0
 public override void Draw(GameScreen screen, Main main)
 {
     if (!collision)
     {
         main.spriteBatch.Draw(before, screen.DrawPos(main, position), null, color, before.Center());
     }
     else
     {
         main.spriteBatch.Draw(after, screen.DrawPos(main, position), null, color, after.Center());
     }
     
 }
Example #2
0
 public void Draw(GameScreen screen, Main main)
 {
     Color color = Color.White;
     if (invincible > 0)
     {
         color *= 0.75f;
     }
     Texture2D texture = textures[(int)direction];
     main.spriteBatch.Draw(texture, screen.DrawPos(main, position), null, color, texture.Center());
     if (Attacking)
     {
         color = Color.White;
         if (!AttackCanDamage)
         {
             color *= 0.5f;
         }
         float rotation = Helper.DirectionToRotation(direction);
         main.spriteBatch.Draw(slashTexture, screen.DrawPos(main, position), null, color, rotation,
             slashTexture.Center(), 1f, SpriteEffects.None, 1f);
     }
 }
Example #3
0
 public override void Draw(GameScreen screen, Main main)
 {
     main.spriteBatch.Draw(texture, screen.DrawPos(main, position), null, color, texture.Center());
 }