Examples of BuildCreepRoundMessage


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

  private void handle(BuildCreepMessage m) {
    String type = m.getCreepType();
    int senderId = m.getClientId();
    int recipientId =
      this.getGame().getClients().succ(senderId).getClient().getClientID();
    BuildCreepRoundMessage n = new BuildCreepRoundMessage();
    n.setRoundId(this.maxTick + IConstants.USER_ACTION_DELAY);
    n.setPlayerId(recipientId);
    n.setCreepType(type);
    n.setSenderId(senderId);
    this.getGame().sendAll(n);
  }
View Full Code Here

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

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

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

        }
      }
      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()));
      c.setBuildTime((int) (bcrm.getRoundId() - roundId));
      c.setSenderId(bcrm.getSenderId());
      c.setPlayerID(bcrm.getPlayerId());

      if (!this.isDead()) {
        this.getCreeps().add(c)
      } else {
        this.getTransfer().add(c);
      }
      System.out.println("build creep: " + (bcrm.getRoundId() - roundId));

      // play sound now
      if (managementSound != null) {
        managementSound.creepStartsSound(c.getType());
      }
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.