Examples of BuildTowerRoundMessage


Examples of de.creepsmash.common.messages.server.BuildTowerRoundMessage

   * @param m the message
   */
  private void handle(BuildTowerMessage m) {
    String type = m.getTowerType();
    Point position = m.getPosition();
    BuildTowerRoundMessage n = new BuildTowerRoundMessage();
    n.setRoundId(this.maxTick + IConstants.USER_ACTION_DELAY);
    n.setPlayerId(m.getClientId());
    n.setTowerType(type);
    n.setTowerPosition(position);
    n.setTowerId(this.nextTowerId++);
    this.getGame().sendAll(n);
  }
View Full Code Here

Examples of de.creepsmash.common.messages.server.BuildTowerRoundMessage

    }
   
    logger.info("MSG:" + messageString);

    if (BuildTowerRoundMessage.PATTERN.matcher(messageString).matches()) {
      messageObject = new BuildTowerRoundMessage();
    } else if (BuildCreepRoundMessage.PATTERN.matcher(messageString)
        .matches()) {
      messageObject = new BuildCreepRoundMessage();
    } else if (CreateGameResponseMessage.PATTERN.matcher(messageString)
        .matches()) {
View Full Code Here

Examples of de.creepsmash.common.messages.server.BuildTowerRoundMessage

        managementSound.playerWonSound();
      }
    }

    if (gm instanceof BuildTowerRoundMessage) {
      BuildTowerRoundMessage btrm = (BuildTowerRoundMessage) gm;
      Grid grid = this.gameBoard.getGrid((int) btrm.getTowerPosition()
          .getX(), (int) btrm.getTowerPosition().getY());
     
      if (grid.isFree()) {
      Tower t = TowerFactory.createTower(this, IConstants.Towers
          .valueOf(IConstants.Towers.class, btrm.getTowerType()),
          grid);
      t.setBuilding(true);
      t.setBuildTime((int) (btrm.getRoundId() - roundId));
      t.setId(btrm.getTowerId());
      this.addtower(t);

      System.out.println(btrm.getRoundId() - roundId);
      }

    } else if (gm instanceof UpgradeTowerRoundMessage) {
      UpgradeTowerRoundMessage utrm = (UpgradeTowerRoundMessage) gm;
      Tower upgradeTower;
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.