public void Draw(SpriteBatch spriteBatch, Point position, Point textureLocation, float layer)
        {
            Rectangle destinationRectangle = new Rectangle(position.X, position.Y, (int)(Constants.GameScaler * frameWidth), (int)(Constants.GameScaler * frameHeight));
            Rectangle sourceRectangle      = new Rectangle(frameWidth * textureLocation.X, frameHeight * textureLocation.Y, frameWidth, frameHeight);

            SimpleDraw.Draw(spriteBatch, sprite, destinationRectangle, sourceRectangle, Color.White, layer);
        }
        public void Draw(SpriteBatch spriteBatch, Point position, float layer)
        {
            Rectangle sourceRectangle      = new Rectangle(currentFrame * frameWidth, 0, frameWidth, frameHeight);
            Rectangle destinationRectangle = new Rectangle(position.X, position.Y, (int)(RoomConstants.SpriteMultiplier * frameWidth), (int)(RoomConstants.SpriteMultiplier * frameHeight));

            SimpleDraw.Draw(spriteBatch, sprite, destinationRectangle, sourceRectangle, Color.White, Constants.DrawLayer.MenuButtonSelector);
        }
Example #3
0
        public void Draw(SpriteBatch spriteBatch, Point position, float layer)
        {
            Rectangle destinationRectangle = new Rectangle(position, new Point((int)(sprite.Width * Constants.GameScaler), (int)(sprite.Height * Constants.GameScaler)));
            Rectangle sourceRectangle      = sprite.Bounds;

            SimpleDraw.Draw(spriteBatch, sprite, destinationRectangle, sourceRectangle, Color.White, layer);
        }
Example #4
0
        public void Draw(SpriteBatch spriteBatch, Point position, float layer)
        {
            Rectangle destinationRectangle = new Rectangle(position.X, position.Y, RoomConstants.RoomWidth, RoomConstants.RoomHeight);
            Rectangle sourceRectangle      = new Rectangle(0, 0, sprite.Width, sprite.Height);

            SimpleDraw.Draw(spriteBatch, sprite, destinationRectangle, sourceRectangle, Color.White * .6f, layer);
        }
Example #5
0
        public void Draw(SpriteBatch spriteBatch, Point position, bool damaged, float layer)
        {
            int row;

            if (currentDir)
            {
                row = rightRow;
            }
            else
            {
                row = leftRow;
            }

            int column = currentFrame % numColumns;

            Rectangle sourceRectangle      = new Rectangle(width * column, height * row, width, height);
            Rectangle destinationRectangle = new Rectangle(position.X, position.Y, (int)(Constants.GameScaler * width), (int)(Constants.GameScaler * height));

            if (pokemonOn)
            {
                destinationRectangle = new Rectangle(position.X, position.Y, (int)(Constants.PokemonScaler * width), (int)(Constants.PokemonScaler * height));
            }

            SimpleDraw.Draw(spriteBatch, sprite, destinationRectangle, sourceRectangle, flashRed && damaged ? Color.Red : Color.White, layer);
        }
Example #6
0
        public void Draw(SpriteBatch spriteBatch, Point position, Point textureLocation, float layer)
        {
            Rectangle destinationRectangle = new Rectangle(position.X, position.Y, (int)(RoomConstants.SpriteMultiplier * width), (int)(RoomConstants.SpriteMultiplier * height));
            Rectangle sourceRectangle      = new Rectangle(width * textureLocation.X, height * textureLocation.Y, width, height);

            SimpleDraw.Draw(spriteBatch, sprite, destinationRectangle, sourceRectangle, Color.White, layer);
        }
        public void Draw(SpriteBatch spriteBatch, Point position, float layer)
        {
            Rectangle destinationRectangle = new Rectangle(position.X, position.Y, (int)(Constants.GameScaler * sprite.Width), (int)(Constants.GameScaler * sprite.Height));
            Rectangle sourceRectangle      = new Rectangle(0, 0, sprite.Width, sprite.Height);

            SimpleDraw.Draw(spriteBatch, sprite, destinationRectangle, sourceRectangle, Color.White, layer);
        }
        public void Draw(SpriteBatch spriteBatch, Point position, float layer)
        {
            //o need to change scalar as sprite is already a good size.
            Rectangle sourceRectangle      = new Rectangle(0, 0, sprite.Width, sprite.Height);
            Rectangle destinationRectangle = new Rectangle(position.X, position.Y, (int)(Constants.GameScaler * sprite.Width), (int)(Constants.GameScaler * sprite.Width));

            SimpleDraw.Draw(spriteBatch, sprite, destinationRectangle, sourceRectangle, Color.White, layer);
        }
        public void Draw(SpriteBatch spriteBatch, Point position, float layer)
        {
            int       row                  = (int)(currentFrame / (float)numColumns);
            int       column               = currentFrame % numColumns;
            Rectangle sourceRectangle      = new Rectangle(frameWidth * column, frameHeight * row, frameWidth, frameHeight);
            Rectangle destinationRectangle = new Rectangle(position.X, position.Y, (int)(RoomConstants.SpriteMultiplier * frameWidth), (int)(RoomConstants.SpriteMultiplier * frameHeight));

            SimpleDraw.Draw(spriteBatch, sprite, destinationRectangle, sourceRectangle, Color.White, layer);
        }
        public void Draw(SpriteBatch spriteBatch, Point position, float layer)
        {
            int currentRow    = 0;
            int currentColumn = currentFrame % totalFrames;

            Rectangle sourceRectangle      = new Rectangle(frameWidth * currentColumn, frameHeight * currentRow, frameWidth, frameHeight);
            Rectangle destinationRectangle = new Rectangle(position.X, position.Y, (int)(frameWidth * Constants.GameScaler), (int)(frameHeight * Constants.GameScaler));

            SimpleDraw.Draw(spriteBatch, sprite, destinationRectangle, sourceRectangle, Color.White, layer);
        }
Example #11
0
        public void Draw(SpriteBatch spriteBatch, Point position, float layer)
        {
            int row    = currentFrame % numRows;
            int column = 0;

            Rectangle sourceRectangle      = new Rectangle(width * column, height * row, width, height);
            Rectangle destinationRectangle = new Rectangle(position.X, position.Y, (int)(Constants.GameScaler * width), (int)(Constants.GameScaler * height));

            SimpleDraw.Draw(spriteBatch, sprite, destinationRectangle, sourceRectangle, Color.White, layer);
        }
Example #12
0
        public void Draw(SpriteBatch spriteBatch, Point position, bool drawWithDamage, float layer)
        {
            Rectangle destinationRectangle = new Rectangle(position.X, position.Y, (int)(sprite.Width * Constants.GameScaler), (int)(sprite.Height * Constants.GameScaler));

            if (pokemonOn)
            {
                destinationRectangle = new Rectangle(position.X, position.Y, (int)(sprite.Width * Constants.TrainerScaler), (int)(sprite.Height * Constants.TrainerScaler));
            }
            Rectangle sourceRectangle = sprite.Bounds;

            SimpleDraw.Draw(spriteBatch, sprite, destinationRectangle, sourceRectangle, flashRed && drawWithDamage ? Color.Red : Color.White, layer);
        }
        public void Draw(SpriteBatch spriteBatch, Point position, float layer)
        {
            int currentRow    = 0;
            int currentColumn = frameToCurrentColumnArray[currentFrame];

            Rectangle sourceRectangle      = new Rectangle(frameWidth * currentColumn, frameHeight * currentRow, frameWidth, frameHeight);
            Rectangle destinationRectangle = new Rectangle(position.X, position.Y, (int)(frameWidth * Constants.GameScaler), (int)(frameHeight * Constants.GameScaler));

            if (pokemonOn)
            {
                destinationRectangle = new Rectangle(position.X, position.Y, (int)(frameWidth * Constants.TrainerScaler), (int)(frameHeight * Constants.TrainerScaler));
            }

            SimpleDraw.Draw(spriteBatch, sprite, destinationRectangle, sourceRectangle, Color.White, layer);
        }
Example #14
0
        public void Draw(SpriteBatch spriteBatch, Point position, bool drawWithDamage, float layer)
        {
            int currentRow    = 0;
            int currentColumn = currentFrame % numColumns;

            Rectangle sourceRectangle      = new Rectangle(frameWidth * currentColumn, frameHeight * currentRow, frameWidth, frameHeight);
            Rectangle destinationRectangle = new Rectangle(position.X, position.Y, (int)(frameWidth * Constants.GameScaler), (int)(frameHeight * Constants.GameScaler));

            if (pokemonOn)
            {
                destinationRectangle = new Rectangle(position.X, position.Y, (int)(frameWidth * Constants.TrainerScaler), (int)(frameHeight * Constants.TrainerScaler));
            }

            SimpleDraw.Draw(spriteBatch, sprite, destinationRectangle, sourceRectangle, flashRed && drawWithDamage ? Color.Red : Color.White, layer);
        }
Example #15
0
        public void Draw(SpriteBatch spriteBatch, Point position, float layer)
        {
            if (FinishedAnimation())
            {
                return;
            }

            int currentRow    = 0;
            int currentColumn = currentFrame % totalFrames;

            Rectangle sourceRectangle      = new Rectangle(width * currentColumn, height * currentRow, width, height);
            Rectangle destinationRectangle = new Rectangle(position.X, position.Y, (int)(width * Constants.GameScaler), (int)(height * Constants.GameScaler));

            SimpleDraw.Draw(spriteBatch, sprite, destinationRectangle, sourceRectangle, Color.White, layer);
        }
        public void Draw(SpriteBatch spriteBatch, Point position, float layer)
        {
            int width, height;
            int currentRow    = 0;
            int currentColumn = currentFrame % totalFrames;

            width  = upLeftSprite.Width / numColumns;
            height = upLeftSprite.Height / numRows;
            SimpleDraw.Draw(spriteBatch, upLeftSprite, new Rectangle(position.X - xOffset, position.Y - yOffset, (int)(width * Constants.GameScaler), (int)(height * Constants.GameScaler)), new Rectangle(width * currentColumn, height * currentRow, width, height), Color.White, layer);

            width  = downLeftSprite.Width / numColumns;
            height = downLeftSprite.Height / numRows;
            SimpleDraw.Draw(spriteBatch, downLeftSprite, new Rectangle(position.X - xOffset, position.Y + yOffset, (int)(width * Constants.GameScaler), (int)(height * Constants.GameScaler)), new Rectangle(width * currentColumn, height * currentRow, width, height), Color.White, layer);

            width  = upRightSprite.Width / numColumns;
            height = upRightSprite.Height / numRows;
            SimpleDraw.Draw(spriteBatch, upRightSprite, new Rectangle(position.X + xOffset, position.Y - yOffset, (int)(width * Constants.GameScaler), (int)(height * Constants.GameScaler)), new Rectangle(width * currentColumn, height * currentRow, width, height), Color.White, layer);

            width  = downRightSprite.Width / numColumns;
            height = downRightSprite.Height / numRows;
            SimpleDraw.Draw(spriteBatch, downRightSprite, new Rectangle(position.X + xOffset, position.Y + yOffset, (int)(width * Constants.GameScaler), (int)(height * Constants.GameScaler)), new Rectangle(width * currentColumn, height * currentRow, width, height), Color.White, layer);
        }
        public void Draw(SpriteBatch spriteBatch, Point position, Rectangle textureSource, float layer)
        {
            Rectangle destinationRectangle = new Rectangle(position.X, position.Y, (int)(RoomConstants.SpriteMultiplier * textureSource.Width), (int)(RoomConstants.SpriteMultiplier * textureSource.Height));

            SimpleDraw.Draw(spriteBatch, sprite, destinationRectangle, textureSource, Color.White, layer);
        }
Example #18
0
        public void Draw(SpriteBatch spriteBatch, Point position, Rectangle textureSource, float layer)
        {
            Rectangle destinationRectangle = new Rectangle(position.X, position.Y, (int)(textureSource.Width * Constants.GameScaler), (int)(textureSource.Height * Constants.GameScaler));

            SimpleDraw.Draw(spriteBatch, sprite, destinationRectangle, textureSource, Color.White, layer);
        }