Package com.aldaviva.autorpg.data.types

Examples of com.aldaviva.autorpg.data.types.MapPoint


  @Autowired
  private RealmMap worldMap;

  public void handleProgress(Character character) {
    MapPoint origin = character.getLocation();
    if (origin == null) {
      origin = new MapPoint();
      origin.x = Utils.getRandomInt(0, Integer.valueOf(Configuration.getValue(ConfigurationKey.MAP_WIDTH)));
      origin.y = Utils.getRandomInt(0, Integer.valueOf(Configuration.getValue(ConfigurationKey.MAP_HEIGHT)));
    }
    MapPoint destination = worldMap.getDestination(origin, RealmMap.MovementDirection.getRandomDirection());
    character.setLocation(destination);
    LOGGER.debug(character.getName() + " has walked to " + destination.x + ", " + destination.y);
  }
View Full Code Here


      character.setCreated(new Date());
      character.setExperience(0);
      character.setLevel(1);
      character.setName(avatarName);
      character.setDesignation(designation);
      character.setLocation(new MapPoint(1, 1));
      character.setPlayer(player);
      character.setFemale(female);
     
      LOGGER.debug("new avatar's player attrib set to "+player.getName()+". Result of calling getter: "+character.getPlayer());
     
View Full Code Here

  public void init(){
    LOGGER.debug("Initializing World Map.");
  }
 
  public MapPoint getDestination(MapPoint origin, MovementDirection movement) {
    MapPoint destination = new MapPoint();

    int upperX = Integer.parseInt(Configuration.getValue(ConfigurationKey.MAP_WIDTH));
    int lowerX = 0;
    int upperY = Integer.parseInt(Configuration.getValue(ConfigurationKey.MAP_HEIGHT));
    int lowerY = 0;
View Full Code Here

TOP

Related Classes of com.aldaviva.autorpg.data.types.MapPoint

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.