예제 #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);
 }