Examples of Area


Examples of games.stendhal.server.util.Area

   * Tests for bailNoDM.
   */
  @Test
  public void testBailNoDM() {
    final StendhalRPZone zone = new StendhalRPZone("zone");
    final AdosDeathmatch adm = new AdosDeathmatch(zone, new Area(zone, 0, 0, 1, 1));
    adm.createNPC("th", 0, 0);
    final SpeakerNPC th = NPCList.get().get("th");
    assertNotNull(th);
    final Engine en = th.getEngine();
    final Player player = PlayerTestHelper.createPlayer("bob");
View Full Code Here

Examples of games.stendhal.server.util.Area

   * Tests for bailDoneDM.
   */
  @Test
  public void testBailDoneDM() {
    final StendhalRPZone zone = new StendhalRPZone("zone");
    final AdosDeathmatch adm = new AdosDeathmatch(zone, new Area(zone, 0, 0, 1, 1));
    adm.createNPC("th", 0, 0);
    final SpeakerNPC th = NPCList.get().get("th");
    assertNotNull(th);
    final Engine en = th.getEngine();
    final Player player = PlayerTestHelper.createPlayer("bob");
View Full Code Here

Examples of games.stendhal.server.util.Area

   * Tests for bailStartedDMNOhelmet.
   */
  @Test
  public void testBailStartedDMNOhelmet() {
    final StendhalRPZone zone = new StendhalRPZone("zone");
    final AdosDeathmatch adm = new AdosDeathmatch(zone, new Area(zone, 0, 0, 1, 1));
    adm.createNPC("th", 0, 0);
    final SpeakerNPC th = NPCList.get().get("th");
    assertNotNull(th);
    final Engine en = th.getEngine();
    final Player player = PlayerTestHelper.createPlayer("bob");
View Full Code Here

Examples of games.stendhal.server.util.Area

   * Tests for fire.
   */
  @Test
  public void testFire() {
    final StendhalRPZone zone = new StendhalRPZone("zone");
    final AdosDeathmatch adm = new AdosDeathmatch(zone, new Area(zone, 0, 0, 1, 1));
    adm.createNPC("th", 0, 0);
    final SpeakerNPC th = NPCList.get().get("th");
    assertNotNull(th);
    final Engine en = th.getEngine();
    final Player player = PlayerTestHelper.createPlayer("bob");
View Full Code Here

Examples of games.stendhal.server.util.Area

   * @param  attributes  Configuration attributes.
   */
  public void configureZone(final StendhalRPZone zone, final Map<String, String> attributes) {
    final Rectangle2D shape = new Rectangle2D.Double();
    shape.setRect(88, 77, 112 - 88 + 1, 94 - 77 + 1);
    final Area arena = new Area(zone, shape);
    final AdosDeathmatch deathmatch = new AdosDeathmatch(zone, arena);
    deathmatch.createHelmet(102, 75);
    deathmatch.createNPC("Thanatos", 98, 77);
  }
View Full Code Here

Examples of games.stendhal.server.util.Area

  public void execute(Player admin, List<String> args) {
    super.execute(admin, args);
    TurnNotifier.get().dontNotify(this);
    StendhalRPWorld world = SingletonRepository.getRPWorld();
    zone = world.getZone("int_semos_bank");
    pathArea = new Area(zone, 32, 7, 35, 7);
    tablePathArea = new Area(zone, 35, 2, 40, 8);
    TurnNotifier.get().notifyInSeconds(CHECK_INTERVAL, this);
  }
View Full Code Here

Examples of games.stendhal.server.util.Area

  private void buildSecretRoomArea(final StendhalRPZone zone, final Map<String, String> attributes) {
    Observer observer = new DrowObserver();
   
    // describe secret room tunnel here
    final Area a1 = new Area(zone, 33, 50, 10, 20);
    final Area a2 = new Area(zone, 23, 021, 49);
   
    for(CreatureRespawnPoint p:zone.getRespawnPointList()) {
      if(p!=null) {
        if(a1.contains(p) || a2.contains(p)) {
          if(creatures.indexOf(p.getPrototypeCreature().getName())!=-1) {
            // it is our creature, set up observer now
            p.addObserver(observer);         
          }
        }       
View Full Code Here

Examples of games.stendhal.server.util.Area

     */
    private Area getPen(StendhalRPZone zone) {
      if (pen == null) {
        Rectangle2D rect = new Rectangle2D.Double();
        rect.setRect(SHEEP_PEN_X, SHEEP_PEN_Y, SHEEP_PEN_WIDTH, SHEEP_PEN_HEIGHT);
        pen = new Area(zone, rect);
      }
     
      return pen;
    }
View Full Code Here

Examples of games.stendhal.server.util.Area

     * @param zone the zone to check
     * @return list of sheep in the pen
     */
    private List<Sheep> sheepInPen(StendhalRPZone zone) {
      List<Sheep> sheep = new LinkedList<Sheep>();
      Area pen = getPen(zone);
     
      for (RPEntity entity : zone.getPlayerAndFriends()) {
        if (entity instanceof Sheep) {
          if (pen.contains(entity)) {
            sheep.add((Sheep) entity);
          }
        }
      }
     
View Full Code Here

Examples of horse.Area

  Area area;

  @Before
  public void setUp() throws Exception
  {
    area = new Area();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.