public void Act(char c) { double elapsed = DateTime.Now.Subtract(this.inicio).TotalSeconds; if (elapsed < this.Apertura / velocidad) { return; } if (HasActionFor(c) && this.Apertura != 0) { this.inicio = DateTime.Now; if (this.aperturaActual == this.aperturaActual) //Hay que cerrar { closing = true; opening = false; } if (this.aperturaActual == 0) //Hay que abrir { closing = false; opening = true; } } if (HasActionFor(c) && this.Apertura == 0) { GlUtils.Beep(); } }