Package de.creepsmash.common.messages.client

Examples of de.creepsmash.common.messages.client.BuildTowerMessage


    if (g == null)
      return false;
   
    if ((g.isFree()) && (!g.isOccupied()) && (tower != null) && (!context.isDead())) {
      if (context.getCredits() >= tower.getPrice()) {
        BuildTowerMessage btm = new BuildTowerMessage();
        btm.setClientId(context.getPlayerId());
        btm.setPosition(new Point(g.getLocation()[0], g.getLocation()[1]));
        btm.setTowerType(tower.toString());

        context.getNetwork().sendMessage(btm);
        context.setCredits(context.getCredits() - tower.getPrice());
        g.setOccupiedStatus(true);
        return true;
View Full Code Here

TOP

Related Classes of de.creepsmash.common.messages.client.BuildTowerMessage

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.