Package de.creepsmash.client.tower

Examples of de.creepsmash.client.tower.AbstractTower


    });

    weakStrategyButton
        .addActionListener(new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            AbstractTower t;
            t = (AbstractTower) context.selectTower();
            System.out.println("test: " + t.isReady());
            if (t.isReady()) {
            if (weakStrategyButton.getModel().isSelected()) {
              FindCreepStrategy fcs = new FindWeakestCreep(t);
              fcs.setCreepLock(lockCreepButton.getModel()
                  .isSelected());
              context.setStrategy(fcs);
            } else {
              weakStrategyButton.setSelected(true);
            }} else
              weakStrategyButton.setSelected(false);
          }
        });

    hardStrategyButton
        .addActionListener(new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            AbstractTower t;
            t = (AbstractTower) context.selectTower();
            if (t.isReady()) {
            if (hardStrategyButton.getModel().isSelected()) {
              FindCreepStrategy fcs = new FindStrongestCreep(t);
              fcs.setCreepLock(lockCreepButton.getModel()
                  .isSelected());
              context.setStrategy(fcs);
            } else {
              hardStrategyButton.setSelected(true);
            }} else
              hardStrategyButton.setSelected(false);
          }
        });

    closeStrategyButton
        .addActionListener(new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            AbstractTower t;
            t = (AbstractTower) context.selectTower();
            if (t.isReady()) {
            if (closeStrategyButton.getModel().isSelected()) {
              FindCreepStrategy fcs = new FindClosestCreep(t);
              fcs.setCreepLock(lockCreepButton.getModel()
                  .isSelected());
              context.setStrategy(fcs);
            } else {
              closeStrategyButton.setSelected(true);
            }} else
              closeStrategyButton.setSelected(false);
          }
        });

    fastestStrategyButton
        .addActionListener(new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            AbstractTower t;
            t = (AbstractTower) context.selectTower();
            if (t.isReady()) {
            if (fastestStrategyButton.getModel().isSelected()) {
              FindCreepStrategy fcs = new FindFastestCreep(t);
              fcs.setCreepLock(lockCreepButton.getModel()
                  .isSelected());
              context.setStrategy(fcs);
            } else {
              fastestStrategyButton.setSelected(true);
            }} else
              fastestStrategyButton.setSelected(false);
          }
        });

    lockCreepButton.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(java.awt.event.ActionEvent evt) {
        AbstractTower t;
        t = (AbstractTower) context.getSelectedTower();
        if (t.isReady()) {
        FindCreepStrategy fcs = null;
        if (fastestStrategyButton.getModel().isSelected())
          fcs = new FindFastestCreep(t);
        if (closeStrategyButton.getModel().isSelected())
          fcs = new FindClosestCreep(t);
View Full Code Here

TOP

Related Classes of de.creepsmash.client.tower.AbstractTower

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.