Package de.creepsmash.common.messages.server

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


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

    ChangeStrategyRoundMessage csm = new ChangeStrategyRoundMessage();
    csm.setRoundId(this.maxTick + IConstants.USER_ACTION_DELAY);
    csm.setPlayerId(message.getClientId());
    csm.setTowerId(towerId);
    csm.setStrategyType(message.getStrategyType());
    csm.setLocked(message.isLocked());
    this.getGame().sendAll(csm);
   
  }
View Full Code Here


    } 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()) {
      messageObject = new StartGameMessage();
    } else if (StartGameResponseMessage.PATTERN.matcher(messageString)
        .matches()) {
View Full Code Here

          break;
        }
      }

    } else if (gm instanceof ChangeStrategyRoundMessage) {
      ChangeStrategyRoundMessage csm = (ChangeStrategyRoundMessage) gm;
      // find the tower we want to change
      for (Tower tower : towers) {
        if (tower.getId() == csm.getTowerId() && tower.isReady()) {
          FindCreepStrategy fcs = StrategyFactory.getStrategyForName(
              csm.getStrategyType(), tower);
          fcs.setCreepLock(csm.isLocked());
          ((AbstractTower) tower).setChangeStrategyTime((int)(csm.getRoundId() - roundId));
          ((AbstractTower) tower).setSelectedStrategy(fcs);
          break;
        }
      }
View Full Code Here

TOP

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

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.