Package games.stendhal.common

Examples of games.stendhal.common.Direction.nextDirection()


    logger.debug(e.getClickCount() + " click count and " + e.getScrollType() + " scroll type and wheel rotation " + e.getWheelRotation());
    if (e.getClickCount() <= 1) {
      Direction current = User.get().getDirection();
      if (e.getUnitsToScroll() > 0) {
        // Turn right
        client.addDirection(current.nextDirection(), true);
      } else {
        // Turn left
        client.addDirection(current.nextDirection().oppositeDirection(), true);
      }
    }
View Full Code Here


      if (e.getUnitsToScroll() > 0) {
        // Turn right
        client.addDirection(current.nextDirection(), true);
      } else {
        // Turn left
        client.addDirection(current.nextDirection().oppositeDirection(), true);
      }
    }
  }
 
  /*
 
View Full Code Here

        if ((currentDir == Direction.STOP)
            || weWouldLeaveArea(creature, creature.getDirection())
            || creature.getZone().collides(creature, creature.getX() + currentDir.getdx(),
                creature.getY() + currentDir.getdy())) {
          for (int i = 0; i < 4; i++) {
            currentDir = currentDir.nextDirection();

            if (!weWouldLeaveArea(creature, currentDir)
                && !creature.getZone().collides(creature, creature.getX() + currentDir.getdx(),
                    creature.getY() + currentDir.getdy())) {
              creature.setDirection(currentDir);
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.