Exemple #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());
     }
     
 }
Exemple #2
0
 public virtual void Draw(GameScreen screen, int x, int y, Main main)
 {
 }
Exemple #3
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);
     }
 }
Exemple #4
0
 public void Revive(GameScreen screen)
 {
     life = maxLife;
     attackTimer = 0;
     screen.ChangeRoom(lastCheckpoint.room, lastCheckpoint.position);
 }
Exemple #5
0
 public abstract void Draw(GameScreen screen, Main main);
 public override void Draw(GameScreen screen, Main main)
 {
     main.spriteBatch.Draw(texture, screen.DrawPos(main, position), null, color, texture.Center());
 }