Пример #1
0
        public override void Update(GameTime gameTime)
        {
            int time = gameTime.TotalGameTime.Seconds;
            int imageX, imageY;

            imageX = (int)ThemeImage1.Position.X;
            imageY = (int)ThemeImage1.Position.Y;
            imageY++;

            objManager.Update(gameTime);

            if (isload)
            {
                if (backgroundImage.Position.X >= 0)
                {
                    backgroundImage.Move(-15, 0);
                }
                else if (backgroundImage.Position.X <= 0)
                {
                    objManager.Add(startGame);
                    objManager.Add(loadGame);
                    objManager.Add(options);
                    objManager.Add(exitGame);
                    objManager.Add(ThemeImage1);
                    objManager.Add(stainedGlass);
                    objManager.Add(stainedGlass2);
                    backgroundImage.SetPosition(new Vector2(0, 0));
                    isload = false;
                }
            }

            XandYMouse.Text = "X =" + Mouse.GetState().X + " Y =" + Mouse.GetState().Y
                              + " Time = " + time.ToString() + "Window =" + GraphicsDevice.PresentationParameters.Bounds.ToString();


            base.Update(gameTime);
        }