Пример #1
0
 public void Draw(SpriteBatch spriteBatch)
 {
     spriteBatch.Draw(bgImg, bgRect, color);
     snake.Draw(spriteBatch);
     selectButton.Draw(spriteBatch);
     spriteBatch.DrawString(font, skinName, skinNamePos, Color.DarkGoldenrod);
 }
Пример #2
0
        public void Draw(SpriteBatch spriteBatch)
        {
            pwButton.Draw(spriteBatch);
            skinButton.Draw(spriteBatch);
            switch (state)
            {
            case ShopState.Skins:

                foreach (ShopItemInterface si in skinPages[skinPage])
                {
                    si.Draw(spriteBatch);
                }
                nextPageButton.Draw(spriteBatch);
                prevPageButton.Draw(spriteBatch);

                break;

            case ShopState.Powerups:

                foreach (ShopItemInterface si in pwInterfaces)
                {
                    si.Draw(spriteBatch);
                }

                break;
            }
        }
Пример #3
0
 public void Draw(SpriteBatch spriteBatch)
 {
     toggleButton.Draw(spriteBatch);
     if (Toggled)
     {
         spriteBatch.Draw(falseImg, falseRect, Color.White);
     }
 }
Пример #4
0
        public void Draw(SpriteBatch spriteBatch)
        {
            if (showing)
            {
                spriteBatch.Draw(bgImg, bgRect, bgColor);
                spriteBatch.DrawString(font, Text, textPos, Color.Orange);
                hideButton.Draw(spriteBatch);

                if (viewButton != null)
                {
                    viewButton.Draw(spriteBatch);
                }
            }
        }
Пример #5
0
 public void Draw(SpriteBatch spriteBatch)
 {
     spriteBatch.Draw(bgImg, bgRect, bgColor);
     spriteBatch.DrawString(font, name, namePos, Color.DarkGoldenrod);
     if (itemType == ShopItemType.Powerup)
     {
         spriteBatch.Draw(itemImg, itemRect, Color.White);
     }
     else
     {
         snake.Draw(spriteBatch);
     }
     spriteBatch.DrawString(font, costString, costPos, Color.DarkGoldenrod);
     buyButton.Draw(spriteBatch);
 }
Пример #6
0
        public void Draw(SpriteBatch spriteBatch)
        {
            // Draw background, as it makes the interface more visually appealing
            spriteBatch.Draw(rectImg, bgRect, bgColor);

            // Draw skin for an easier way to recognize the user
            snake.ChangeSkin(this.User.CurrentSkin);
            snake.Draw(spriteBatch);

            // Draw clickable username
            usernameButton.Draw(spriteBatch, usernameColor);

            // Draw clickable trash button
            trashButton.Draw(spriteBatch, trashColor);
        }
Пример #7
0
 public void Draw(SpriteBatch spriteBatch)
 {
     button.Draw(spriteBatch);
     if (rewardPopup.Active)
     {
         rewardPopup.Draw(spriteBatch);
         if (showingGift)
         {
             if (itemImg != null)
             {
                 spriteBatch.Draw(itemImg, itemRect, itemColor);
             }
             else if (drawSnake != null)
             {
                 drawSnake.Draw(spriteBatch);
             }
         }
     }
 }
Пример #8
0
        public void Draw(SpriteBatch spriteBatch)
        {
            if (active)
            {
                spriteBatch.Draw(transImg, transRect, transColor);

                spriteBatch.Draw(backgroundImage, drawRectangle, colorOfBackground);

                spriteBatch.DrawString(font, text, textPosition, Color.White);

                okButton.Draw(spriteBatch);

                if (hasCancelButton)
                {
                    cancelButton.Draw(spriteBatch);
                }

                if (hasCheckbox)
                {
                    queryCheckbox.Draw(spriteBatch, Color.White);
                }
            }
        }
Пример #9
0
 public void Draw(SpriteBatch spriteBatch)
 {
     nextPageButton.Draw(spriteBatch);
     prevPageButton.Draw(spriteBatch);
     spriteBatch.Draw(tutorialImages[imgIndex], tutorialRect, Color.White);
 }