public override void Draw(SpriteBatch spriteBatch)
 {
     if (!IsDead)
     {
         if (_enemyType.Contains("Left"))
         {
             _frames.Draw(spriteBatch, this.direction, 1f, (int)_frameTypes.Left);
         }
         else
         {
             _frames.Draw(spriteBatch, this.direction, 1f, (int)_frameTypes.Right);
         }
     }
     else
     {
         if (_enemyType.Contains("Left"))
         {
             _frames.Draw(spriteBatch, this.direction, 1f, (int)_frameTypes.LeftDestroyed);
         }
         else
         {
             _frames.Draw(spriteBatch, this.direction, 1f, (int)_frameTypes.RightDestroyed);
         }
     }
     base.Draw(spriteBatch);
 }
Beispiel #2
0
        public override void Draw(SpriteBatch spriteBatch)
        {
            base.Draw(spriteBatch);

            EnemySniperSpriteTypes e;

            if (_targetClockAngle == 0)
            {
                e = EnemySniperSpriteTypes.GunNeutral;
            }
            else if (_targetClockAngle == 3 || _targetClockAngle == 9)
            {
                e = _recoilTimeRemaining > 0 ? EnemySniperSpriteTypes.GunNeutral : EnemySniperSpriteTypes.GunNeutralRecoil;
            }
            else if (_targetClockAngle > 9 || _targetClockAngle < 3)
            {
                e = _recoilTimeRemaining > 0 ? EnemySniperSpriteTypes.GunHigh : EnemySniperSpriteTypes.GunHighRecoil;
            }
            else
            {
                e = EnemySniperSpriteTypes.GunLow;
            }


            snipersprites.Draw(spriteBatch, this.direction, 1f, (int)e);
        }