コード例 #1
0
    @Override
    public void onEnter() {

      // Unpause if paused.
      if (GameEngine.getTimeMode() == TimeMode.PAUSED) {
        GameEngine.revertTimeMode();
      }

      // Collapse event log if expanded.
      if (EventLog.getIsDisplayModeEnabled(EventLog.DisplayMode.EXPANDED)) {
        EventLog.toggleDisplayMode(EventLog.DisplayMode.EXPANDED);
      }
    }
コード例 #2
0
    @Override
    public void execute() {
      EventLog.toggleDisplayMode(EventLog.DisplayMode.PINNED);

      String message = "You have ";
      String messageB = " the event log ";
      if (EventLog.getIsDisplayModeEnabled(EventLog.DisplayMode.PINNED)) {
        message = message + "pinned" + messageB + "to";
      } else {
        message = message + "unpinned" + messageB + "from";
      }

      message = message + " the screen.";

      EventLog.registerEvent(Event.ALERT_MINOR, message);
    }
コード例 #3
0
    @Override
    public void onEnter() {
      EventLog.toggleDisplayMode(EventLog.DisplayMode.EXPANDED);

      pauseIfUnpaused();
    }