Esempio n. 1
0
        public override void Update(GameTime gameTime, TouchCollection touchCollection)
        {
            if (touchCollection.Count() > 0)
            {
                //get the first touch
                TouchLocation touch = touchCollection.ElementAt(0);
                if (touch.State == TouchLocationState.Pressed)
                {
                    String command = Helper.GetFirstButtonPressCommand(listButtons, (int)touch.Position.X, (int)touch.Position.Y);

                    if (command.Equals("returnToSolarSystem"))
                    {
                        NextScreen = game.screenSolarSystem;
                    }
                    else if (command.Equals("nasa"))
                    {
                        AnimationFixed background = new AnimationFixed(game.textureMarsNASAInfo, 1, 0, 800, 480, 0, 0, 0);
                        NextScreen = new ScreenInfo(game, new Background(background, null), null, this);
                    }
                    else if (command.Equals("moon"))
                    {
                        AnimationFixed background = new AnimationFixed(game.textureMarsMoonInfo, 1, 0, 800, 480, 0, 0, 0);
                        NextScreen = new ScreenInfo(game, new Background(background, null), null, this);
                    }
                    else if (command.Equals("storm"))
                    {
                        AnimationFixed background = new AnimationFixed(game.textureMarsStormInfo, 1, 0, 800, 480, 0, 0, 0);
                        NextScreen = new ScreenInfo(game, new Background(background, null), null, this);
                    }
                }
            }
        }
        public override void Update(GameTime gameTime, TouchCollection touchCollection)
        {
            if (touchCollection.Count() > 0)
            {
                //get the first touch
                TouchLocation touch = touchCollection.ElementAt(0);
                if (touch.State == TouchLocationState.Pressed)
                {
                    String command = Helper.GetFirstButtonPressCommand(listButtons, (int)touch.Position.X, (int)touch.Position.Y);

                    if (command.Equals("volcano"))
                    {
                        AnimationFixed background = new AnimationFixed(game.textureVenusVolcanoInfo, 1, 0, 800, 480, 0, 0, 0);
                        NextScreen = new ScreenInfo(game, new Background(background, null), null, this);
                    }
                    else if (command.Equals("rotate"))
                    {
                        AnimationFixed background = new AnimationFixed(game.textureVenusRotateInfo, 1, 0, 800, 480, 0, 0, 0);
                        NextScreen = new ScreenInfo(game, new Background(background, null), null, this);
                    }
                    else if (command.Equals("nasa"))
                    {
                        AnimationFixed background = new AnimationFixed(game.textureVenusNASAInfo, 1, 0, 800, 480, 0, 0, 0);
                        NextScreen = new ScreenInfo(game, new Background(background, null), null, this);
                    }
                    else if (command.Equals("earth"))
                    {
                        AnimationFixed background = new AnimationFixed(game.textureVenusEarthInfo, 1, 0, 800, 480, 0, 0, 0);
                        NextScreen = new ScreenInfo(game, new Background(background, null), null, this);
                    }
                }
            }
        }
        public override void Update(GameTime gameTime, TouchCollection touchCollection)
        {
            if (touchCollection.Count() > 0)
            {
                //get the first touch
                TouchLocation touch = touchCollection.ElementAt(0);
                if (touch.State == TouchLocationState.Pressed)
                {
                    String command = Helper.GetFirstButtonPressCommand(listButtons, (int)touch.Position.X, (int)touch.Position.Y);

                    if (command.Equals("moon"))
                    {
                        AnimationFixed background = new AnimationFixed(game.textureUranusMoonInfo, 1, 0, 800, 480, 0, 0, 0);
                        NextScreen = new ScreenInfo(game, new Background(background, null), null, this);
                    }
                    else if (command.Equals("ring"))
                    {
                        AnimationFixed background = new AnimationFixed(game.textureUranusRingInfo, 1, 0, 800, 480, 0, 0, 0);
                        NextScreen = new ScreenInfo(game, new Background(background, null), null, this);
                    }
                    else if (command.Equals("wind"))
                    {
                        AnimationFixed background = new AnimationFixed(game.textureUranusWindInfo, 1, 0, 800, 480, 0, 0, 0);
                        NextScreen = new ScreenInfo(game, new Background(background, null), null, this);
                    }
                    else if (command.Equals("ocean"))
                    {
                        AnimationFixed background = new AnimationFixed(game.textureUranusOceanInfo, 1, 0, 800, 480, 0, 0, 0);
                        NextScreen = new ScreenInfo(game, new Background(background, null), null, this);
                    }
                    else if (command.Equals("nasa"))
                    {
                        AnimationFixed background = new AnimationFixed(game.textureUranusNASAInfo, 1, 0, 800, 480, 0, 0, 0);
                        NextScreen = new ScreenInfo(game, new Background(background, null), null, this);
                    }
                }
            }
        }
Esempio n. 4
0
        public override void Update(GameTime gameTime, TouchCollection touchCollection)
        {
            if (touchCollection.Count() > 0)
            {
                //get the first touch
                TouchLocation touch = touchCollection.ElementAt(0);
                if (touch.State == TouchLocationState.Pressed)
                {
                    String command = Helper.GetFirstButtonPressCommand(listButtons, (int)touch.Position.X, (int)touch.Position.Y);

                    if (command.Equals("play"))
                    {
                        AnimationFixed background = new AnimationFixed(game.textureMercury, 1, 0, 800, 480, 0, 0, 0);
                        NextScreen = game.GetNewScreenSolarSystem();
                    }

                    else if (command.Equals("about"))
                    {
                        AnimationFixed background = new AnimationFixed(game.textureAboutBackground, 1, 0, 800, 480, 0, 0, 0);
                        NextScreen = new ScreenInfo(game, new Background(background, null), null, this);
                    }
                }
            }
        }