Package de.creepsmash.common.messages.server

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


      client.handleError(ErrorType.Error,
          "No such tower (tried to sell tower " + towerId + ")");
      return;
    }

    SellTowerRoundMessage n = new SellTowerRoundMessage();
    n.setRoundId(this.maxTick + IConstants.USER_ACTION_DELAY);
    n.setPlayerId(m.getClientId());
    n.setTowerId(towerId);
    this.getGame().sendAll(n);
  }
View Full Code Here


      messageObject = new RegistrationResponseMessage();
    } else if (RoundMessage.PATTERN.matcher(messageString).matches()) {
      messageObject = new RoundMessage();
    } else if (SellTowerRoundMessage.PATTERN.matcher(messageString)
        .matches()) {
      messageObject = new SellTowerRoundMessage();
    }else if (ChangeStrategyRoundMessage.PATTERN.matcher(messageString)
        .matches()) {
      messageObject = new ChangeStrategyRoundMessage();
    }else if (StartGameMessage.PATTERN.matcher(messageString)
        .matches()) {
View Full Code Here

          break;
        }
      }

    } else if (gm instanceof SellTowerRoundMessage) {
      SellTowerRoundMessage strm = (SellTowerRoundMessage) gm;
      Tower sellTower;
      // find the tower we want to sell
      for (Tower tower : towers) {
        if (tower.getId() == strm.getTowerId() && tower.isReady()) {
          sellTower = tower;
          sellTower.setSellTime((int) (strm.getRoundId() - roundId));
          sellTower.setSelling(true);
          break;
        }
      }
      System.out.println(strm.getRoundId() - roundId);
    } else if (gm instanceof BuildCreepRoundMessage) {

      BuildCreepRoundMessage bcrm = (BuildCreepRoundMessage) gm;
      Creep c = CreepFactory.createCreep(this, IConstants.Creeps.valueOf(
          IConstants.Creeps.class, bcrm.getCreepType()));
View Full Code Here

TOP

Related Classes of de.creepsmash.common.messages.server.SellTowerRoundMessage

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.