Example #1
0
        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;
            }
        }
Example #2
0
        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 (idle)
                {
                    graphics.DrawImageFix(GameImage.EggMachine, 128, 128, 0, animation, drawX, drawY, this);
                }
                else
                {
                    graphics.DrawImageFix(GameImage.EggMachine, 128, 128, 1, animation, drawX, drawY, this);
                }
            }
            else
            {
                if (idle)
                {
                    graphics.DrawImageFixFlip(GameImage.EggMachine, 128, 128, 0, animation, drawX, drawY, this);
                }
                else
                {
                    graphics.DrawImageFixFlip(GameImage.EggMachine, 128, 128, 1, animation, drawX, drawY, this);
                }
            }
        }
Example #3
0
        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);
                }
            }
        }
Example #4
0
        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);
                }
            }
        }
Example #5
0
        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);
                }
            }
        }
Example #6
0
        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);
                }
            }
        }
Example #7
0
        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 (!jumping)
                {
                    int textureCol = animation / 4;
                    graphics.DrawImageFix(GameImage.ItemEnemy, 64, 64, 0, textureCol, drawX, drawY, this);
                }
                else
                {
                    int textureCol = animation / 2;
                    graphics.DrawImageFix(GameImage.ItemEnemy, 64, 64, 1, textureCol, drawX, drawY, this);
                }
            }
            else
            {
                if (!jumping)
                {
                    int textureCol = animation / 4;
                    graphics.DrawImageFixFlip(GameImage.ItemEnemy, 64, 64, 0, textureCol, drawX, drawY, this);
                }
                else
                {
                    int textureCol = animation / 2;
                    graphics.DrawImageFixFlip(GameImage.ItemEnemy, 64, 64, 1, textureCol, drawX, drawY, this);
                }
            }
        }
Example #8
0
        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);
                    }
                }
            }
        }
Example #9
0
 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);
     }
 }
Example #10
0
        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);
            }
        }
Example #11
0
        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);
            }
        }
Example #12
0
        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.Nurunuru, 128, 128, 1, 0, drawX, drawY, this);
                    }
                    else
                    {
                        if (attackCount < 32 && (attackCount / 4) % 2 == 0)
                        {
                            graphics.DrawImageFix(GameImage.Nurunuru, 128, 128, 1, 0, drawX, drawY, this);
                        }
                        else
                        {
                            graphics.DrawImageFix(GameImage.Nurunuru, 128, 128, 0, 0, drawX, drawY, this);
                        }
                    }
                }
                else
                {
                    if (!attacking)
                    {
                        graphics.DrawImageFixFlip(GameImage.Nurunuru, 128, 128, 1, 0, drawX, drawY, this);
                    }
                    else
                    {
                        if (attackCount < 32 && (attackCount / 4) % 2 == 0)
                        {
                            graphics.DrawImageFixFlip(GameImage.Nurunuru, 128, 128, 1, 0, drawX, drawY, this);
                        }
                        else
                        {
                            graphics.DrawImageFixFlip(GameImage.Nurunuru, 128, 128, 0, 0, drawX, drawY, this);
                        }
                    }
                }
            }
            else
            {
                if (direction == Direction.Left)
                {
                    if (!attacking)
                    {
                        graphics.DrawImageAlphaFix(GameImage.Nurunuru, 128, 128, 1, 0, drawX, drawY, this, 128);
                    }
                    else
                    {
                        if (attackCount < 32 && (attackCount / 4) % 2 == 0)
                        {
                            graphics.DrawImageAlphaFix(GameImage.Nurunuru, 128, 128, 1, 0, drawX, drawY, this, 128);
                        }
                        else
                        {
                            graphics.DrawImageAlphaFix(GameImage.Nurunuru, 128, 128, 0, 0, drawX, drawY, this, 128);
                        }
                    }
                }
                else
                {
                    if (!attacking)
                    {
                        graphics.DrawImageAlphaFixFlip(GameImage.Nurunuru, 128, 128, 1, 0, drawX, drawY, this, 128);
                    }
                    else
                    {
                        if (attackCount < 32 && (attackCount / 4) % 2 == 0)
                        {
                            graphics.DrawImageAlphaFixFlip(GameImage.Nurunuru, 128, 128, 1, 0, drawX, drawY, this, 128);
                        }
                        else
                        {
                            graphics.DrawImageAlphaFixFlip(GameImage.Nurunuru, 128, 128, 0, 0, drawX, drawY, this, 128);
                        }
                    }
                }
            }
        }
Example #13
0
 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);
             }
         }
     }
 }
Example #14
0
        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);
                    }
                }
            }
        }
Example #15
0
 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);
             }
         }
     }
 }
Example #16
0
 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);
                 }
             }
         }
     }
 }
Example #17
0
 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);
         }
     }
 }
Example #18
0
 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;
     }
 }
Example #19
0
File: Babo.cs Project: sinshu/chaos
 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);
         }
     }
 }
Example #20
0
 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);
     }
 }
Example #21
0
 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);
     }
 }
Example #22
0
 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);
         }
     }
 }
Example #23
0
        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);
            }
        }
Example #24
0
 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);
         }
     }
 }
Example #25
0
        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;
                        }
                    }
                }
            }
        }
Example #26
0
 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;
                 }
             }
         }
     }
 }