Exemple #1
0
        public override void Render(TimeSpan elapsedGameTime)
        {
            mainLayer.Begin();

            GameService.CloudSubLayout.Render(mainLayer);

            if (State.MenuAnimation.Completed)
            {
                if (!State.StartClicked)
                {
                    drawMenu(0);
                }
            }
            else
            {
                State.MenuAnimation.Render(mainLayer);
            }

            if (State.StartGameAnimation.Completed)
            {
                if (!State.StartClicked)
                {
                    drawStartGame(0);
                }
            }
            else
            {
                State.StartGameAnimation.Render(mainLayer);
            }


            mainLayer.End();
        }
        public void Render(TimeSpan elapsedGameTime)
        {
            mainLayer.Begin();


            mainLayer.Save();
            mainLayer.DrawRectangle(new Color(0, 0, 0), 0, 0, _width, _height);

            mainLayer.DrawImage(LobbyOverlay, LobbyOverlayPosition.X, LobbyOverlayPosition.Y);
            mainLayer.DrawImage(ProfileOverlay, ProfileOverlayPosition.X, ProfileOverlayPosition.Y);
            mainLayer.DrawImage(GoldCoinOverlay, GoldCoinOverlayPosition.X, GoldCoinOverlayPosition.Y);
            mainLayer.DrawImage(SilverCoinOverlay, SilverCoinOverlayPosition.X, SilverCoinOverlayPosition.Y);

            mainLayer.DrawImage(LobbyBackground, LobbyBackgroundPosition.X, LobbyBackgroundPosition.Y);


            headerButtonGroup(mainLayer, HeaderButtonTop.AllRooms, SelectedHeaderButton == HeaderButtonTop.AllRooms);
            headerButtonGroup(mainLayer, HeaderButtonTop.Featured, SelectedHeaderButton == HeaderButtonTop.Featured);
            headerButtonGroup(mainLayer, HeaderButtonTop.Favorites, SelectedHeaderButton == HeaderButtonTop.Favorites);

            createRoomButtonGroup(mainLayer);
            rooms(mainLayer, RoomButtonSize.Width, RoomButtonSize.Height);

            mainLayer.DrawImage(ScrollBarOverlay, ScrollBarPosition.X, ScrollBarPosition.Y);
            mainLayer.DrawImage(ScrollBarButtonOverlay, ScrollBarPosition.X + 4, ScrollBarPosition.Y + (ScrollBarButtonPosition));

            mainLayer.Restore();
            mainLayer.End();
        }
        public void Render(TimeSpan elapsedGameTime)
        {
            mainLayer.Begin();
            mainLayer.Save();

            renderBackground();
            switch (CurrentBingoState)
            {
            case BingoLayoutState.PurchaseCards:
                renderPurchaseCards();
                break;

            case BingoLayoutState.InGame:
                renderInGame();
                break;

            case BingoLayoutState.Lobby:
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
            mainLayer.Restore();
            mainLayer.End();
        }
Exemple #4
0
 public void Render(TimeSpan elapsedGameTime)
 {
     mainLayer.Begin();
     mainLayer.Save();
     mainLayer.DrawRectangle(new Color(58, 58, 148), 0, 0, _width, _height);
     mainLayer.Restore();
     mainLayer.End();
 }
        public void Render(TimeSpan elapsedGameTime)
        {
            mainLayer.Begin();

            mainLayer.Clear();
            mainLayer.Save();
            mainLayer.Translate(0, 61);
            mainLayer.DrawImage(Barrier, BarrierPosition);
            mainLayer.DrawImage(RedWalkway, WalkwayPosition);



            this.ticking += 2;

            mainLayer.Save();

            var person = _renderer.GetImage("female.blonde.front");

            mainLayer.Translate((-this.ticking + (_width * 100)) % _width, 50);


            double rotate;

            rotate = this.ticking % 30 < 15 ? .07 : -.07;
            mainLayer.DrawImage(person, -person.Width / 2, -person.Height / 2, rotate, person.Center);

            mainLayer.Restore();


            mainLayer.Save();

            person = _renderer.GetImage("male.hat.front");
            mainLayer.Translate((this.ticking + (_width * 100)) % _width, 100);

            rotate = this.ticking % 30 < 15 ? .07 : -.07;



            mainLayer.SetDrawingEffects(DrawingEffects.FlipHorizontally);
            mainLayer.DrawImage(person, -person.Width / 2, -person.Height / 2, rotate, person.Center);
            mainLayer.Restore();



            mainLayer.Restore();
            mainLayer.End();
        }
Exemple #6
0
        public void Render(TimeSpan elapsedGameTime)
        {
            mainLayer.Begin();

            mainLayer.Save();
            mainLayer.Clear();

            if (helloWorldAnimation != null)
            {
                helloWorldAnimation.Render(mainLayer);
            }
            if (State.ShowWelcome)
            {
                if (welcomeAnimation != null)
                {
                    welcomeAnimation.Render(mainLayer);
                }
            }

            mainLayer.Restore();

            mainLayer.End();
        }
Exemple #7
0
        public override void Render(TimeSpan elapsedGameTime)
        {
            mainLayer.Begin();


            GameService.CloudSubLayout.Render(mainLayer);
            State.SoundSubLayout.Render(mainLayer);

            mainLayer.Save();

            IImage logoImage    = Assets.Images.Layouts.PenguinLogo;
            IImage shuffleImage = Assets.Images.Layouts.ShuffleLogo;

            if (PenguinLogoAnimation.Completed)
            {
                mainLayer.DrawImage(logoImage, Positions.PenguinLogoLocation, true);
            }
            else
            {
                PenguinLogoAnimation.Render(mainLayer);
            }

            if (ShuffleLogoAnimation.Completed)
            {
                mainLayer.DrawImage(shuffleImage, Positions.ShuffleLogoLocation, true);
            }
            else
            {
                ShuffleLogoAnimation.Render(mainLayer);
            }


            if (!PlayButtonAnimation.Completed)
            {
                PlayButtonAnimation.Render(mainLayer);
            }

            else
            {
                if (State.ShowingTutorial > 0)
                {
                    mainLayer.DrawImage(Assets.Images.Layouts.Tutorials.Tutorial[State.ShowingTutorial], Positions.TutorialPosition, true);
                }
                else
                {
                    if (!State.StartClicked)
                    {
                        mainLayer.DrawImage(Assets.Images.Layouts.PlayButton, Positions.StartLocation, true);
                    }
                }
            }

            if (State.ShowingTutorial > 0)
            {
                mainLayer.DrawImage(Assets.Images.Layouts.Tutorials.Tutorial[State.ShowingTutorial], Positions.TutorialPosition, true);
            }
            else
            {
                mainLayer.DrawImage(Assets.Images.Layouts.AboutButton, Positions.TutorialButtonPosition, true);

                if (State.StartClicked)
                {
                    StartGameAnimation.Render(mainLayer);
                }
                else
                {
                    renderAbout();
                }
            }

            mainLayer.Restore();


            //            TouchManager.Render(mainLayer);
            mainLayer.End();
        }