Example #1
0
        private void ToucheUp(Object o, KeyEventArgs e)
        {
            if (e.KeyCode == touches[0] && PGJ1isPressed)
            {
                FonctionsNatives.animerPaletteGJ1(false);
                PGJ1isPressed = false;
            }
            if (e.KeyCode == touches[1] && PDJ1isPressed)
            {
                FonctionsNatives.animerPaletteDJ1(false);
                PDJ1isPressed = false;
            }

            if (e.KeyCode == touches[2] && PGJ2isPressed && configSimple_.estMultiplayer_ && !configSimple_.joueurVirtuel_)
            {
                FonctionsNatives.animerPaletteGJ2(false);
                PGJ2isPressed = false;
            }

            if (e.KeyCode == touches[3] && PDJ2isPressed && configSimple_.estMultiplayer_ && !configSimple_.joueurVirtuel_)
            {
                FonctionsNatives.animerPaletteDJ2(false);
                PDJ2isPressed = false;
            }
            if (e.KeyCode == touches[4] && ressortPressed)
            {
                FonctionsNatives.animerRessort(false);
                ressortPressed = false;
            }

            if (e.KeyValue == (char)Keys.Back)
            {
                recupererTouches();
                FonctionsNatives.reinitialiserPartie();
            }

            if (e.KeyCode == Keys.J)
            {
                lumAmbiante = !lumAmbiante;
                FonctionsNatives.changeLumAmbiant();
                DateTime temps = DateTime.Now;
                if (lumAmbiante && debugLum)
                {
                    Console.WriteLine("{0:hh:mm:ss.fff} - Lumiere AMBIANTE OUVERTE", temps);
                }
                else if (debugLum)
                {
                    Console.WriteLine("{0:hh:mm:ss.fff} - Lumiere AMBIANTE FERMEE", temps);
                }
            }
            if (e.KeyCode == Keys.K)
            {
                lumDirect = !lumDirect;
                FonctionsNatives.changeLumDirect();
                DateTime temps = DateTime.Now;
                if (lumDirect && debugLum)
                {
                    Console.WriteLine("{0:hh:mm:ss.fff} - Lumiere DIRECTIONELLE OUVERTE", temps);
                }
                else if (debugLum)
                {
                    Console.WriteLine("{0:hh:mm:ss.fff} - Lumiere DIRECTIONELLE FERMEE", temps);
                }
            }
            if (e.KeyCode == Keys.L)
            {
                spotlights = !spotlights;
                FonctionsNatives.changeLumSpot();
                DateTime temps = DateTime.Now;
                if (spotlights && debugLum)
                {
                    Console.WriteLine("{0:hh:mm:ss.fff} - Lumiere SPOTLIGHT OUVERTE", temps);
                }
                else if (debugLum)
                {
                    Console.WriteLine("{0:hh:mm:ss.fff} - Lumiere SPOTLIGHT FERMEE", temps);
                }
            }
        }