Example #1
0
 public void Draw(SpriteBatch spriteBatch)
 {
     BlackBackground.Draw(Texture2DStorage.GetBlackBackgroundSpriteSheet(), spriteBatch, Position);
     MessageSprite.Draw(spriteBatch, new Vector2(GlobalDefinitions.GraphicsWidth / 2, GlobalDefinitions.GraphicsHeight / 3));
     ResetSprite.Draw(spriteBatch, new Vector2(GlobalDefinitions.GraphicsWidth / 2, GlobalDefinitions.GraphicsHeight / 3 + offset));
     QuitSprite.Draw(spriteBatch, new Vector2(GlobalDefinitions.GraphicsWidth / 2, GlobalDefinitions.GraphicsHeight / 3 + 3 * offset));
 }
Example #2
0
        public override void Draw(SpriteBatch spriteBatch)
        {
            Rectangle sourceRectangle      = new Rectangle(0, 0, 96, 96);
            Rectangle destinationRectangle = new Rectangle((int)GlobalDefinitions.OctPosition.X, (int)GlobalDefinitions.OctPosition.Y, 96, 96);

            //use texture2dStorage to get the texture2d of the sprite
            spriteBatch.Draw(Texture2DStorage.GetOldWomanSpriteSheet(), destinationRectangle, sourceRectangle, Color.White);
        }
Example #3
0
        public void Draw(SpriteBatch spriteBatch, Vector2 Position)
        {
            Texture = Texture2DStorage.GetWallDownSpriteSheet();
            Nullable <Rectangle> sourceRectangle = new Rectangle(0, 0, Texture.Width, Texture.Height);

            destinationRectangle = new Rectangle(400, 100, Texture.Width / 2, Texture.Height / 2);
            spriteBatch.Draw(Texture, destinationRectangle, sourceRectangle, Color.White);
        }
Example #4
0
        public void Draw(SpriteBatch spriteBatch, Vector2 Position)
        {
            Rectangle sourceRectangle = new Rectangle(0, 0, 96, 96);

            destinationRectangle = new Rectangle((int)Position.X, (int)Position.Y, 96, 96);
            //use texture2dStorage to get the texture2d of the sprite
            spriteBatch.Draw(Texture2DStorage.GetOldManSpriteSheet(), destinationRectangle, sourceRectangle, Color.White);
        }
Example #5
0
        public void Draw(SpriteBatch spriteBatch, Vector2 Position)
        {
            Texture = Texture2DStorage.GetHeadExteriorSpriteSheet();
            Rectangle sourceRectangle = new Rectangle(0, 0, Texture.Width, Texture.Height);

            destinationRectangle = new Rectangle(0, 0, Texture.Width * 6, Texture.Height * 6);
            spriteBatch.Draw(Texture, destinationRectangle, sourceRectangle, Color.White);
        }
Example #6
0
        public void Draw(SpriteBatch spriteBatch)
        {
            Texture = Texture2DStorage.GetFullMapSpriteSheet();



            DestinationRectangle = new Rectangle(0, 0, GlobalDefinitions.GraphicsWidth, GlobalDefinitions.GraphicsHeight);


            spriteBatch.Draw(Texture, DestinationRectangle, SourceRectangle, Color.White);
        }
Example #7
0
        public void Draw(SpriteBatch spriteBatch, Vector2 MovingPosition)
        {
            Background.Draw(Texture2DStorage.GetInventoryBackgroundSpriteSheet(), spriteBatch, Backgroundposition + MovingPosition);

            if (MovingPosition == new Vector2(0, 0))
            {
                Selection.Draw(Texture2DStorage.GetRedSelectionSpriteSheet(), spriteBatch, SelectionPosition);

                if (game.Link.HasMap)
                {
                    MapSprite.Draw(Texture2DStorage.GetMapSpriteSheet(), spriteBatch, SmallMapPosition);
                    //MapPositionSprite.Draw();
                    //LinkPositionSprite.Draw();
                }

                if (game.Link.BombNumber > 0)
                {
                    BombSprite.Draw(Texture2DStorage.GetBombSelectSpriteSheet(), spriteBatch, BombPosition);
                }

                if (game.Link.HasBow)
                {
                    BowSprite.Draw(Texture2DStorage.GetBowSpriteSheet(), spriteBatch, bowPosition);
                }
                if (game.Link.HasCompass)
                {
                    CompassSprite.Draw(Texture2DStorage.GetCompassSpriteSheet(), spriteBatch, CompassPosition);
                }
                if (game.Link.HasBoomer)
                {
                    BoomerSprite.Draw(Texture2DStorage.GetBoomerSelectSpriteSheet(), spriteBatch, BoomerPosition);
                }

                if (selectedItem == BombSprite)
                {
                    BombSprite.Draw(Texture2DStorage.GetBombSpriteSheet(), spriteBatch, SelectItemPosition);
                }
                else if (selectedItem == BowSprite)
                {
                    BowSprite.Draw(Texture2DStorage.GetBowSpriteSheet(), spriteBatch, SelectItemPosition);
                }
                else if (selectedItem == BoomerSprite)
                {
                    BoomerSprite.Draw(Texture2DStorage.GetBoomerangSpriteSheet(), spriteBatch, SelectItemPosition);
                }
            }
        }
        public override void Draw(SpriteBatch spriteBatch)
        {
            Rectangle sourceRectangle;
            Rectangle destinationRectangle;

            if (currentFrame < 5)
            {
                sourceRectangle      = new Rectangle(0, 0, 96, 96);
                destinationRectangle = new Rectangle((int)GlobalDefinitions.Position.X, (int)GlobalDefinitions.Position.Y, 96, 96);//I don't understand why the width of destinationRectangle has to be like this.
            }


            else
            {
                sourceRectangle      = new Rectangle(96, 0, 192, 96);
                destinationRectangle = new Rectangle((int)GlobalDefinitions.Position.X, (int)GlobalDefinitions.Position.Y, 192, 96);
            }
            spriteBatch.Draw(Texture2DStorage.GetRightMovingBlueOctorokSpriteSheet(), destinationRectangle, sourceRectangle, Color.White);
        }
Example #9
0
        public virtual void Draw(SpriteBatch spriteBatch, Vector2 Position)
        {
            Rectangle sourceRectangle;


            if (currentFrame < 5)
            {
                sourceRectangle      = new Rectangle(0, 0, 96, 96);
                destinationRectangle = new Rectangle((int)GlobalDefinitions.Position.X, (int)GlobalDefinitions.Position.Y, 96, 96);
            }


            else
            {
                sourceRectangle      = new Rectangle(96, 0, 96, 96);
                destinationRectangle = new Rectangle((int)GlobalDefinitions.Position.X, (int)GlobalDefinitions.Position.Y, 96, 96);
            }

            spriteBatch.Draw(Texture2DStorage.GetLeftMovingLinkSpriteSheet(), destinationRectangle, sourceRectangle, Color.White);//use Texture2DStorage class to load texture2D
        }
Example #10
0
        public override void Draw(SpriteBatch spriteBatch)
        {
            Rectangle sourceRectangle;
            Rectangle destinationRectangle;

            if (currentFrame < 5)
            {
                sourceRectangle      = new Rectangle(0, 0, 96, 96);
                destinationRectangle = new Rectangle((int)GlobalDefinitions.Position.X, (int)GlobalDefinitions.Position.Y, 96, 96);
            }


            else
            {
                sourceRectangle      = new Rectangle(96, 0, 192, 96);
                destinationRectangle = new Rectangle((int)GlobalDefinitions.Position.X, (int)GlobalDefinitions.Position.Y, 192, 96);
            }

            spriteBatch.Draw(Texture2DStorage.GetDownMovingBlueMSpriteSheet(), destinationRectangle, sourceRectangle, Color.White);
        }
Example #11
0
        public void Draw(SpriteBatch spriteBatch)
        {
            Rectangle sourceRectangle;
            Rectangle destinationRectangle;

            if (currentFrame < 3)
            {
                sourceRectangle      = new Rectangle(0, 0, 96, 96);
                destinationRectangle = new Rectangle((int)GlobalDefinitions.Position.X, (int)GlobalDefinitions.Position.Y, 96, 96);//I don't understand why the width of destinationRectangle has to be like this.
            }
            else if (3 <= currentFrame && currentFrame < 6)
            {
                sourceRectangle      = new Rectangle(96, 0, 96, 96);
                destinationRectangle = new Rectangle((int)GlobalDefinitions.Position.X, (int)GlobalDefinitions.Position.Y, 96, 96);
            }
            else
            {
                sourceRectangle      = new Rectangle(96 + 96, 0, 96, 96);
                destinationRectangle = new Rectangle((int)GlobalDefinitions.Position.X, (int)GlobalDefinitions.Position.Y, 96, 96);
            }
            spriteBatch.Draw(Texture2DStorage.GetLinkUseItemSpriteSheet(), destinationRectangle, sourceRectangle, Color.White);//use Texture2DStorage class to load texture2D
        }
Example #12
0
        public void Draw()
        {
            headSprite.Draw(Texture2DStorage.HeadExteriorSpriteSheet, spriteBatch, new Vector2(0, 1056));
            int HeartContainer = 12;
            int life           = 19;

            if (HeartContainer < 8)
            {
                for (int i = 0; i < HeartContainer; i++)
                {
                    EmptyBloodHeartSprite.Draw(Texture2DStorage.GetHeartNoBloodSpriteSheet(), spriteBatch, new Vector2(1056 + 48 * i, 1248));
                }
            }
            else
            {
                for (int k = 0; k < 8; k++)
                {
                    EmptyBloodHeartSprite.Draw(Texture2DStorage.GetHeartNoBloodSpriteSheet(), spriteBatch, new Vector2(1056 + 48 * k, 1248));
                }
                for (int j = 0; j < HeartContainer - 8; j++)
                {
                    EmptyBloodHeartSprite.Draw(Texture2DStorage.GetHeartNoBloodSpriteSheet(), spriteBatch, new Vector2(1056 + 48 * j, 1296));
                }
            }
            if (life < 16)
            {
                if (life % 2 == 0)
                {
                    for (int i = 0; i < life / 2; i++)
                    {
                        FullBloodHeartSprite.Draw(Texture2DStorage.GetHeartFullBloodSpriteSheet(), spriteBatch, new Vector2(1056 + 48 * i, 1248));
                    }
                }
                else
                {
                    for (int i = 0; i < life / 2; i++)
                    {
                        FullBloodHeartSprite.Draw(Texture2DStorage.GetHeartFullBloodSpriteSheet(), spriteBatch, new Vector2(1056 + 48 * i, 1248));
                    }

                    HalfBloodHeartSprite.Draw(Texture2DStorage.GetHeartHalfBloodSpriteSheet(), spriteBatch, new Vector2(1056 + 48 * (life / 2), 1248));
                }
            }
            else
            {
                if (life % 2 == 0)
                {
                    for (int i = 0; i < 8; i++)
                    {
                        FullBloodHeartSprite.Draw(Texture2DStorage.GetHeartFullBloodSpriteSheet(), spriteBatch, new Vector2(1056 + 48 * i, 1248));
                    }
                    for (int j = 0; j < life / 2 - 8; j++)
                    {
                        FullBloodHeartSprite.Draw(Texture2DStorage.GetHeartFullBloodSpriteSheet(), spriteBatch, new Vector2(1056 + 48 * j, 1296));
                    }
                }
                else
                {
                    for (int i = 0; i < life / 2; i++)
                    {
                        FullBloodHeartSprite.Draw(Texture2DStorage.GetHeartFullBloodSpriteSheet(), spriteBatch, new Vector2(1056 + 48 * i, 1248));
                    }
                    for (int j = 0; j < life / 2 - 8; j++)
                    {
                        FullBloodHeartSprite.Draw(Texture2DStorage.GetHeartFullBloodSpriteSheet(), spriteBatch, new Vector2(1056 + 48 * j, 1296));
                    }


                    HalfBloodHeartSprite.Draw(Texture2DStorage.GetHeartHalfBloodSpriteSheet(), spriteBatch, new Vector2(1056 + 48 * ((life - 16) / 2), 1296));
                }
            }
            int bombscore  = 111;
            int keyscore   = 222;
            int rupeescore = 333;


            spriteBatch.DrawString(font, bombscore.ToString(), new Vector2(720, 1360), Color.White, 0, font.MeasureString(bombscore.ToString()), 3.0f, SpriteEffects.None, 1f);
            spriteBatch.DrawString(font, keyscore.ToString(), new Vector2(720, 1310), Color.White, 0, font.MeasureString(keyscore.ToString()), 3.0f, SpriteEffects.None, 1f);
            spriteBatch.DrawString(font, rupeescore.ToString(), new Vector2(720, 1210), Color.White, 0, font.MeasureString(rupeescore.ToString()), 3.0f, SpriteEffects.None, 1f);

            //     spriteBatch.DrawString(font, Link.RupeeNumber.ToString(), new Vector2(720, 1210), Color.White, 0, font.MeasureString(Link.RupeeNumber.ToString()), 3.0f, SpriteEffects.None, 1f);
            //   spriteBatch.DrawString(font, Link.KeyNumber.ToString(), new Vector2(720, 1310), Color.White, 0, font.MeasureString(Link.KeyNumber.ToString()), 3.0f, SpriteEffects.None, 1f);
            //  spriteBatch.DrawString(font, Link.BombNumber.ToString(), new Vector2(720, 1360), Color.White, 0, font.MeasureString(Link.BombNumber.ToString()), 3.0f, SpriteEffects.None, 1f);
        }