Пример #1
0
  public void transitionTo(GameObject o) {
    nextRoot = o;
    Input.getInstance().setEnabled(false);

    FadeToAction fadeDown =
        new FadeToAction(
            this,
            1.0,
            FADE_TIME,
            new Observer() {

              public void notified(Observable sender) {

                setRoot(nextRoot);

                FadeToAction fadeUp = new FadeToAction(Game.this, 0, FADE_TIME, null);
                rootObject.addChild(fadeUp);
                fadeUp.start();

                Input.getInstance().setEnabled(true);
              }
            });

    rootObject.addChild(fadeDown);
    fadeDown.start();
  }
Пример #2
0
 public void dim() {
   FadeToAction f = new FadeToAction(this, LOW_FADE, FADE_TIME, null);
   addChild(f);
   f.start();
 }
Пример #3
0
 public void brighten() {
   FadeToAction f = new FadeToAction(this, HIGH_FADE, FADE_TIME, null);
   addChild(f);
   f.start();
 }