Exemple #1
0
        public void Encender()
        {
            if (Main.Instancia.PracticaIniciada == false)
            {
                return;
            }
            if (encendido == true) //apago
            {
                encendido = false;
                Main.Instancia.Escena.Pieza.PararPieza();
                Main.Instancia.Escena.Torno.Encendido = false;

                AudioPlayback.PlayOne("apagado.mp3");
                AudioPlayback.StopLoop("trabajando.mp3");
            }
            else //enciendo
            {
                encendido = true;
                Main.Instancia.Escena.Pieza.MoverPieza();
                Main.Instancia.Escena.Torno.Encendido = true;
                AudioPlayback.PlayTwo("arranque.mp3", "trabajando.mp3");
                bajaRevolucion = true;
                altaRevolucion = false;
            }
        }
        public void Update(Cursor cursor)
        {
            if (areaRectangle.Contains(cursor.Position))
            {
                texCurrent = textHover;
                if (cursor.State == Glut.GLUT_DOWN)
                {
                    isPressed  = true;
                    texCurrent = texPressed;
                }
                else

                if (isPressed)
                {
                    if (cursor.State == Glut.GLUT_UP)
                    {
                        isPressed  = false;
                        texCurrent = texNormal;
                        if (onClick != null)
                        {
                            AudioPlayback.PlayOne("click.wav");
                            base.onClick.Invoke();
                        }
                    }
                }
            }
            else
            {
                isPressed  = false;
                texCurrent = texNormal;
            }
        }
Exemple #3
0
 private void encenderTornoToolStripMenuItem_Click(object sender, EventArgs e)
 {
     encenderTornoToolStripMenuItem.Enabled = false;
     apagarTornoToolStripMenuItem.Enabled   = true;
     controladora.Solido.Rotating           = true;
     AudioPlayback.PlayOne("arranque.mp3");
     AudioPlayback.PlayLoop("trabajando.mp3");
 }