Exemple #1
1
  public boolean mouseDown(Event e, int x, int y) {
    if (suspended) {
      animate.resume();
      suspended = false;
    } else {
      animate.suspend();
      suspended = true;
    }

    return true;
  }
Exemple #2
0
 public synchronized void reanudar() {
   if (t != null) t.resume();
   if (soltarCoco != null) soltarCoco.resume();
   suspender = false;
   laberinto1.reanudarCocos();
   if (laberinto1.areComidos())
     try {
       cocoComido.Continuar();
     } catch (Exception ex) {
       Logger.getLogger(ComeCocosView.class.getName()).log(Level.SEVERE, null, ex);
     }
   else if (laberinto1.areweakCocos())
     try {
       cocoWeak.Continuar();
     } catch (Exception ex) {
       Logger.getLogger(ComeCocosView.class.getName()).log(Level.SEVERE, null, ex);
     }
   else
     try {
       cocoNormal.Continuar();
     } catch (Exception ex) {
       Logger.getLogger(ComeCocosView.class.getName()).log(Level.SEVERE, null, ex);
     }
   continuar = true;
   notify();
 }