Examples of applyEffect()


Examples of javafx.scene.canvas.GraphicsContext.applyEffect()

            // with the rounded corners which we don't want.
            Image image = new Image(getResource("default-cover-image.png").openStream());
            Canvas canvas = new Canvas(image.getWidth(), image.getHeight());
            GraphicsContext gc = canvas.getGraphicsContext2D();
            gc.drawImage(image, 0, 0);
            gc.applyEffect(colorAdjust);
            WritableImage colouredImage = new WritableImage((int) image.getWidth(), (int) image.getHeight());
            canvas.snapshot(new SnapshotParameters(), colouredImage);
            coverImageView.setImage(colouredImage);
            // Convert to a PNG and store in the project model.
            ImageIO.setUseCache(false);
View Full Code Here

Examples of org.pokenet.server.battle.BattleField.applyEffect()

      public int use(BattleMechanics mech, Pokemon user, Pokemon target) {
        BattleField field = user.getField();
        SpikesEffect spikes = SpikesEffect.getSpikes(field, SpikesEffect.class);
        if (spikes == null) {
          spikes = new SpikesEffect();
          field.applyEffect(spikes);
        }
        spikes.addSpikes(target);
        return 0;
      }
    }
View Full Code Here

Examples of org.pokenet.server.battle.BattleField.applyEffect()

        FieldEffect effect = field.getEffectByType(SpeedSwapEffect.class);
        if (effect != null) {
          field.removeEffect(effect);
        } else {
          field.showMessage(user.getName() + " twisted the dimensions!");
          field.applyEffect(new SpeedSwapEffect());
        }
        return 0;
      }
      public int getPriority() {
        return -5;
View Full Code Here

Examples of org.pokenet.server.battle.BattleField.applyEffect()

      public int use(BattleMechanics mech, Pokemon user, Pokemon target) {
        BattleField field = user.getField();
        ToxicSpikesEffect spikes = (ToxicSpikesEffect)SpikesEffect.getSpikes(field, ToxicSpikesEffect.class);
        if (spikes == null) {
          spikes = new ToxicSpikesEffect();
          field.applyEffect(spikes);
        }
        spikes.addSpikes(target);
        return 0;
      }
    }
View Full Code Here

Examples of org.pokenet.server.battle.BattleField.applyEffect()

      public int use(BattleMechanics mech, Pokemon user, Pokemon target) {
        BattleField field = user.getField();
        StealthRockEffect spikes = (StealthRockEffect)SpikesEffect.getSpikes(field, StealthRockEffect.class);
        if (spikes == null) {
          spikes = new StealthRockEffect();
          field.applyEffect(spikes);
        }
        spikes.addSpikes(target);
        return 0;
      }
    }
View Full Code Here

Examples of org.pokenet.server.battle.BattleField.applyEffect()

                Constructor<?> ctor = m_effects[i].getConstructor(new Class[] { int.class });
                eff = (WeatherEffect)ctor.newInstance(new Object[] { new Integer(length) });
            } catch (Exception e) {
                throw new InternalError();
            }
            field.applyEffect(eff);
        }
        return 0;
    }
   
}
View Full Code Here

Examples of org.pokenet.server.battle.BattleField.applyEffect()

     }

     public int use(BattleMechanics mech, Pokemon user, final Pokemon target) {
       final String name = m_name;
       BattleField field = user.getField();
       if (!field.applyEffect(new TypeCutStatus(m_cut, user) {
         public String getName() {
           return name;
         }
       })) {
         field.showMessage("But it failed!");
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.