Ejemplo n.º 1
0
        public override void Update(GameTime gameTime)
        {
            #region AvantMenu
            if (!ArretExplosion)
            {
                //-----------------Bloc animation Balle de feu dans auto
                if (FireBalls[0].position.X > PositionGMLF.X)
                {
                    GMPlayer.PlayAnimation(null);
                    OtherPlayer.PlayAnimation(Explosion);
                    FireBalls[0].invisible = true;

                    if (OtherPlayer.FrameIndex == 5)
                    {
                        ArretExplosion = true;
                        PositionGMLF.X = -100;
                    }
                }
                else
                {
                    GMPlayer.PlayAnimation(GrandMere);
                    FireBalls[0].Update();
                    OtherPlayer.PlayAnimation(null);
                    PositionGMLF.X -= 3;
                }
                //--------------------------------(Fin Bloc Anim feu dans Auto)
            }
            else
            {
                //Animation SkateBoard
                if (Player.position.X < FireBalls[0].position.X - 200)
                {
                    Player.position = new Vector2(Player.position.X + 3, Player.position.Y);
                }
                else
                {
                    FireBalls.RemoveAt(0); RemoveScreen(this); AddScreen(new cMainMenu(serviceProvider, GraphicsDeviceManager));
                }
            }
            #endregion
        }