Esempio n. 1
0
        public void Draw(GameTime gameTime, SpriteBatch spriteBatch)
        {
            if (!readFinished)
            {
                //2D
                spriteBatch.Begin();
                webCamBackground.Draw(spriteBatch);
                takeImageButton.Draw(spriteBatch);
                cameraIcon.Draw(spriteBatch);
                confirmReadedColors.Draw(spriteBatch);
                rubiksReadedColors.Draw(spriteBatch);
                colorSelector.Draw(spriteBatch);
                scrambleButton.Draw(spriteBatch);
                spriteBatch.End();
            }
            else
            {
                spriteBatch.Begin();
                if (moveTimeTimer >= moveTimeRate && setSolvePosition == false)
                {
                    solveButton.Draw(spriteBatch);
                }
                spriteBatch.End();
            }

            //3D
            GraphicsDevice.DepthStencilState = DepthStencilState.Default;
            cube.Draw(cubeCamera);
        }
Esempio n. 2
0
 public void Draw(SpriteBatch batch)
 {
     _textTesting.Draw(batch);
     _textPlay.Draw(batch);
     _textQuit.Draw(batch);
     _spriteTest.Draw(batch);
     _textTestMap.Draw(batch);
 }
 public void Draw(SpriteBatch spriteBatch)
 {
     background.Draw(spriteBatch);
     marker.Draw(spriteBatch);
     for (int i = 0; i < _solution.Length; i++)
     {
         spriteBatch.DrawString(_font, _solution[i], positions[i], Color.Black);
     }
     ofTotalMoves.Draw(spriteBatch);
 }
Esempio n. 4
0
 public void Draw(SpriteBatch spriteBatch)
 {
     if (show)
     {
         background.Draw(spriteBatch);
         takeImageButton.Draw(spriteBatch);
         cameraIcon.Draw(spriteBatch);
         exitBtn.Draw(spriteBatch);
     }
 }
 public void Draw(SpriteBatch spriteBatch)
 {
     if (Show)
     {
         colorSelectorBackground.Draw(spriteBatch);
         for (int i = 0; i < colorSelection.Length; i++)
         {
             colorSelection[i].Draw(spriteBatch);
         }
     }
 }
Esempio n. 6
0
 public void Draw(SpriteBatch spriteBatch)
 {
     if (show)
     {
         background.Draw(spriteBatch);
         exitBtn.Draw(spriteBatch);
         red.Draw(spriteBatch);
         green.Draw(spriteBatch);
         blue.Draw(spriteBatch);
     }
 }
 public void Draw(GameTime gameTime, SpriteBatch spriteBatch)
 {
     spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend);
     settingsMenu.Draw(spriteBatch);
     categories.Draw(spriteBatch);
     backBtn.Draw(spriteBatch);
     resetBtn.Draw(spriteBatch);
     applyBtn.Draw(spriteBatch);
     spriteBatch.End();
     audioMenu.Draw(spriteBatch);
     rubiksMenu.Draw(spriteBatch);
     graphicsMenu.Draw(spriteBatch);
     controlsMenu.Draw(spriteBatch);
 }
 public void Draw(GameTime gameTime, SpriteBatch spriteBatch)
 {
     //2D
     spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend);
     rubiksSolverButton.Draw(spriteBatch);
     exitButton.Draw(spriteBatch);
     settingsButton.Draw(spriteBatch);
     title.Draw(spriteBatch);
     gearSprite.Draw(spriteBatch);
     smallGearSprite.Draw(spriteBatch);
     openDoor.Draw(spriteBatch);
     closedDoor.Draw(spriteBatch);
     spriteBatch.End();
     //3D
     GraphicsDevice.DepthStencilState = DepthStencilState.Default;
     cube.Draw(camera);
 }
        public override void Draw(SpriteBatch spriteBatch)
        {
            switch (State)
            {
            case LeaderboardState.Fill:
                spriteBatch.Draw(texLeaderboardSubmit, Vector2.Zero, Color.White);
                spriteBatch.DrawString(Main.FontLarge, _username, vtUsername, Color.White);
                spriteBatch.DrawString(Main.FontLarge, _score.ToString(), vtScore, Color.White);
                btnSubmit.Draw(spriteBatch);
                break;

            case LeaderboardState.Submit:
                spriteBatch.Draw(texLeaderboardSubmit, Vector2.Zero, Color.White);
                spriteBatch.DrawString(Main.FontLarge, _username, vtUsername, Color.White);
                spriteBatch.DrawString(Main.FontLarge, _score.ToString(), vtScore, Color.White);
                spriteBatch.Draw(texWhiteScreen, Vector2.Zero, Color.Black * 0.8f);
                if (tick < 2)
                {
                    tick++;
                }
                else
                {
                    tick = 0;
                    sprLoading.NextFrame();
                }
                sprLoading.Draw(spriteBatch);
                spriteBatch.DrawString(Main.FontNormal, Localize.Instance.SubmittingData, vtSubmiting, Color.White);
                break;

            case LeaderboardState.View:
                spriteBatch.Draw(texLeaderboardBackground, vtBackground, Color.White);
                spriteBatch.DrawString(Main.FontSmall, strView7.ToString(), vtView7, Color.White);
                spriteBatch.DrawString(Main.FontSmall, strViewAll, vtViewAll, Color.White);
                spriteBatch.Draw(texLeaderboardForeground, Vector2.Zero, Color.White);
                spriteBatch.DrawString(Main.FontSmall, strRank, vtRank, Color.White);
                break;
            }

            if (uiDialog.Visible)
            {
                uiDialog.Draw(spriteBatch);
            }
        }
Esempio n. 10
0
 public void Draw(SpriteBatch spriteBatch)
 {
     if (_state != PyramidMapState.Hide)
     {
         spriteBatch.Draw(texBackground, Vector2.Zero, Color.Black * _backgroundAlpha);
         spriteBatch.Draw(texPyramidMap, Vector2.Zero + vtMap, Color.White);
         spriteBatch.DrawString(Main.FontNormal, Title, new Vector2(400 - Main.FontNormal.MeasureString(Title).X / 2, 46) + vtMap, Color.Black);
         spriteBatch.DrawString(Main.FontSmall, Description, new Vector2(122, 90) + vtMap, Color.Black);
         for (short i = 0; i < 15; i++)
         {
             sprStar.SetPosition(recChamber[i].X + 3 + (int)vtMap.X, recChamber[i].Y + 34 + (int)vtMap.Y);
             sprStar.SetFrame(ChamberProcess[PyramidId][i]);
             sprStar.Draw(spriteBatch);
             if (i > ReachedChamberId)
             {
                 Rectangle chamberRect = recChamber[i];
                 chamberRect.X += (int)vtMap.X;
                 chamberRect.Y += (int)vtMap.Y;
                 spriteBatch.Draw(texBackground, chamberRect, Color.Black * 0.7f);
                 spriteBatch.Draw(texLock, chamberRect, Color.White);
             }
         }
     }
 }
Esempio n. 11
0
        public void Draw(SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(contentHolder.ImageAdventureMap, Vector2.Zero, Color.White);

            for (byte i = 0; i < 15; i++)
            {
                if (PyramidProcess[i] >= 0)
                {
                    //draw pyramids
                    sprPyramid.SetPosition(recPyramids[i].X, recPyramids[i].Y);
                    sprPyramid.SetFrame(PyramidProcess[i]);
                    sprPyramid.Draw(spriteBatch);
                }
                if (PyramidProcess[i] == 15)
                {
                    //draw treasures
                    Rectangle srcRect = recTreasures[i];
                    Rectangle desRect = new Rectangle();
                    desRect.X      = 695 + srcRect.X;
                    desRect.Y      = 20 + srcRect.Y;
                    desRect.Width  = srcRect.Width;
                    desRect.Height = srcRect.Height;
                    spriteBatch.Draw(contentHolder.ImageBigTreasures, desRect, srcRect, Color.White);
                }
            }

            //draw explorer's head
            if (moving)
            {
                spriteBatch.Draw(contentHolder.ImageAdventureHead, vtPaths[0], null, Color.White, 0, vtHeadCenter, 1, SpriteEffects.None, 1);
            }
            else
            {
                spriteBatch.Draw(contentHolder.ImageAdventureHead, vtHeads[currentPyramid], null, Color.White, 0, vtHeadCenter, 1, SpriteEffects.None, 1);
            }
        }