Package civquest.gameChange

Examples of civquest.gameChange.GameChangeManager


   *  structures.  Thus, it only needs to listen to GameChanges affecting
   *  the real world - i.e. we always need a ALL_NATIONS-object. */
  private RestrictedToNation resToNation = new RestrictedToNation();

  private void performCommonSetup() throws GameChangeException {
    GameChangeManager gcManager = GameChangeManager.getGameChangeManager();
     gcManager.addAfterListener(this, "AddNation",
                   GameChangeManager.Listening.ALL_NATIONS,
                   "AddNation");
  }
View Full Code Here


  private static final int WIDTH = 250;

  public DetailedFieldInfoComponent(int width) throws GameChangeException {
    setPreferredSize(new Dimension(width, 100));

    GameChangeManager gcManager = GameChangeManager.getGameChangeManager();
     gcManager.addAfterListener(this, "FieldChange",
                   "SetPopulation");


//      setMinimumSize(new Dimension(WIDTH, 100));
//     setPreferredSize(new Dimension(WIDTH, 100));
View Full Code Here

  }

  private void setUpListeners() throws RulesetException, GameChangeException  {
    Registry mainRegistry = guiRegistry.getSubRegistry("main");

    GameChangeManager gcManager = GameChangeManager.getGameChangeManager();
    gcManager.addAfterListener(this, "SetDisplayNation",
                   GameChangeManager.Listening.ALL_NATIONS,
                   "SetDisplayNation");

   
    Ruleset listenerRuleset = mainRegistry.getRuleset(".listens");
View Full Code Here

  public Group(GameDataAccessor gameData, String name) {
    this.gameData = gameData;
    this.name = name;
    try {
      GameChangeManager gcManager = GameChangeManager.getGameChangeManager();
      gcManager.addBeforeListener(this, "RemoveUnit", "RemoveUnit");
    } catch (GameChangeException e) {
      Messages.getMessages().err("Group", "Error while setting up listener: " + e);
      System.exit(-1);
    }
  }
View Full Code Here

      initSeqDistributorForCity(currCity);
    }
  }

  private void setUpListenerRelationships() throws GameChangeException {
    GameChangeManager gcManager = GameChangeManager.getGameChangeManager();
    gcManager.addAfterListener(this, "ActivateNation",
                   GameChangeManager.Listening.ALL_NATIONS,
                   "ActivateNation");
    gcManager.addAfterListener(this, "DeactivateNation",
                   GameChangeManager.Listening.ALL_NATIONS,
                   "DeactivateNation");   

     gcManager.addAfterListener(this, "ConstructCity",
                   GameChangeManager.Listening.ALL_NATIONS,
                   "ConstructCity");
    gcManager.addBeforeListener(this, "RemoveCity",
                  GameChangeManager.Listening.ALL_NATIONS,
                   "RemoveCity");
     gcManager.addAfterListener(this, "SetFieldRuledByCity",
                   GameChangeManager.Listening.ALL_NATIONS,
                   "SetFieldRuledByCity");   
  }
View Full Code Here

TOP

Related Classes of civquest.gameChange.GameChangeManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.