Exemplo n.º 1
0
 public static void draw(boolean menuEnable) {
   if (showMenu) {
     others.notUserObject("menu").setVisible(Setting.persistence.touchMod);
     if (Setting.persistence.touchMod && GameViews.gameview.stackView == null) {
       float x = pad.getKnobPercentX();
       float y = pad.getKnobPercentY();
       double tan = Math.atan2(y, x);
       if (tan < p4 * 3 && tan > p4) MoveController.up();
       else if (tan > p4 * 3 || (tan < -p4 * 3 && tan < 0)) MoveController.left();
       else if (tan > -p4 * 3 && tan < -p4) MoveController.down();
       else if ((tan > -p4 && tan < 0) || (tan > 0 && tan < p4)) MoveController.right();
       else MoveController.stop();
     }
     others.cleanActions();
     for (Actor actor : others.getItems())
       actor.addAction(
           GameViews.gameview.stackView == null ? Actions.fadeIn(0.1f) : Actions.fadeOut(0.1f));
     if (Setting.persistence.betterDisplay)
       mask.setColor(.5f, .5f, .5f, (1 - others.first().getItem().getColor().a) * .3f);
     else mask.setColor(.2f, .2f, .2f, (1 - others.first().getItem().getColor().a) * .85f);
     stage.act();
     if (menuEnable) stage.draw();
   }
 }