Examples of Effect


Examples of org.spout.vanilla.data.effect.Effect

      Vector3f velocity = direction.mul(rand.nextDouble() * 0.1 + 0.2);
      // Set velocity y to above (0.2)
      velocity = velocity.mul(1.0, 0.0, 1.0).add(0.0, 0.2, 0.0);
      velocity = velocity.add(0.045 * rand.nextGaussian(), 0.045 * rand.nextGaussian(), 0.045 * rand.nextGaussian());

      Effect shootEffect;
      Material material = item.getMaterial();
      //TODO: Implement the following 'special' shoot cases:
      // - eggs, arrows, fireballs and snowballs
      // - potions, exp. bottles, monster eggs
      // - armor,

      if (material.equals(VanillaMaterials.ARROW)) {
        shootEffect = GeneralEffects.RANDOM_BOW;
        toLaunch = new Arrow();
      } else if (material.equals(VanillaMaterials.EGG)) {
        shootEffect = GeneralEffects.RANDOM_BOW;
        //TODO: Spawn
      } else if (material.equals(VanillaMaterials.SNOWBALL)) {
        shootEffect = GeneralEffects.RANDOM_BOW;
        //TODO: Spawn
      } else if (material instanceof PotionItem && ((PotionItem) material).isSplash()) {
        shootEffect = GeneralEffects.RANDOM_BOW;
        //TODO: Spawn
      } else if (material.equals(VanillaMaterials.BOTTLE_O_ENCHANTING)) {
        shootEffect = GeneralEffects.RANDOM_BOW;
        //TODO: Spawn
      } else if (material instanceof SpawnEgg) {
        shootEffect = GeneralEffects.RANDOM_BOW;
        //TODO: Spawn
      } else if (material.equals(VanillaMaterials.FIRE_CHARGE)) {
        shootEffect = GeneralEffects.SHOOT_FIREBALL;
        //TODO: Spawn
      } else {
        shootEffect = GeneralEffects.RANDOM_CLICK1;
        position = position.sub(0.0, 0.3, 0.0);
        toLaunch = new Item();
        ((Item) toLaunch).setItemStack(item);
      }

      if (toLaunch != null) {
        block.getWorld().createAndSpawnEntity(position, LoadOption.NO_LOAD, toLaunch.getClass());
      }
      shootEffect.playGlobal(block.getPosition());
      GeneralEffects.SMOKE.playGlobal(block.getPosition(), direction);
      return true;
    }
    // If nothing happened make sure we play the generic click sound.
    GeneralEffects.RANDOM_CLICK2.playGlobal(block.getPosition());
View Full Code Here

Examples of org.springmodules.xt.ajax.action.prototype.scriptaculous.Effect

    /**
     * Get the default error action.<br>
     * This renders the error by highlighting it in red.
     */
    public AjaxAction[] getErrorActions(AjaxSubmitEvent event, ObjectError error){
        Effect highlight = new Effect("Highlight", error.getCode());
        highlight.addOption("startcolor", "#FF0A0A");
        return new AjaxAction[]{highlight};
    }
View Full Code Here

Examples of org.springmodules.xt.ajax.action.prototype.scriptaculous.Effect

        TaggedText msg = new TaggedText(
                this.messageSource.getMessage("message.successful", null, "Successful", LocaleContextHolder.getLocale()),
                TaggedText.Tag.SPAN);
       
        ReplaceContentAction action1 = new ReplaceContentAction("onSuccessMessage", img, msg);
        Effect action2 = new Effect("Shake", "onSuccessMessage");
        SetAttributeAction action3 = new SetAttributeAction("name.field", "value", "");
        SetAttributeAction action4 = new SetAttributeAction("url.field", "value", "");
       
        return new AjaxAction[]{action1, action2, action3, action4};
    }
View Full Code Here

Examples of org.springmodules.xt.ajax.action.prototype.scriptaculous.Effect

        Image img = new Image(event.getHttpRequest().getContextPath() + "/images/error.gif", "error");
        TaggedText txt = new TaggedText(message, TaggedText.Tag.SPAN);
        // Put the message in its proper web page space:
        ReplaceContentAction action1 = new ReplaceContentAction("message", img, txt);
        // Shake the message:
        Effect action2 = new Effect("Shake", "message");
        // Add actions to response:
        response.addAction(action1);
        response.addAction(action2);
    }
View Full Code Here

Examples of org.springmodules.xt.ajax.action.prototype.scriptaculous.Effect

            Component errorMessage = new TaggedText(
                    this.messageSource.getMessage("message.error", null, "Error", LocaleContextHolder.getLocale()),
                    TaggedText.Tag.SPAN);
            AjaxAction removeAction = new RemoveContentAction("onSuccessMessage");
            AjaxAction replaceAction = new ReplaceContentAction("onErrorsMessage", errorImage, errorMessage);
            AjaxAction effectAction = new Effect("Shake", "onErrorsMessage");
            response.addAction(removeAction);
            response.addAction(replaceAction);
            response.addAction(effectAction);
        } else {
            AjaxAction removeAction = new RemoveContentAction("onErrorsMessage");
View Full Code Here

Examples of org.springmodules.xt.ajax.action.prototype.scriptaculous.Effect

        // Create the simple text message:
        SimpleText message = new SimpleText(new StringBuilder("Selected office: ").append(office.getName()).toString());
        // Create an ajax action for setting the message and hi:
        ReplaceContentAction setMessageAction = new ReplaceContentAction("message", message);
        // Create an highlighting effect action for the appearing message:
        Effect highlightAction = new Effect("Highlight", "message");
        highlightAction.addOption("duration", 0.5);
       
        // Create the components to render (a list of html table rows):
        List rows = new LinkedList();
        for(IEmployee emp : employees) {
            TableRow row = new TableRow(emp, new String[]{"firstname", "surname", "matriculationCode"}, null);
View Full Code Here

Examples of org.springmodules.xt.ajax.action.prototype.scriptaculous.Effect

        return response;
    }
   
    public AjaxResponse highlightElement(AjaxActionEvent event) {
        // Create an ajax action for highlighting an element:
        Effect action = new Effect("Highlight", "toApplyEffect");
       
        // Create a concrete ajax response:
        AjaxResponse response = new AjaxResponseImpl();
        // Add the action:
        response.addAction(action);
View Full Code Here

Examples of org.springmodules.xt.ajax.action.prototype.scriptaculous.Effect

        return response;
    }
   
    public AjaxResponse puffElement(AjaxActionEvent event) {
        // Create an ajax action for making an element puff:
        Effect action = new Effect("Puff", "toApplyEffect");
        action.addOption("duration", "3");
       
        // Create a concrete ajax response:
        AjaxResponse response = new AjaxResponseImpl();
        // Add the action:
        response.addAction(action);
View Full Code Here

Examples of org.springmodules.xt.ajax.action.prototype.scriptaculous.Effect

        return response;
    }
   
    public AjaxResponse pulsateElement(AjaxActionEvent event) {
        // Create an ajax action for making pulsate an element:
        Effect action = new Effect("Pulsate", "toApplyEffect");
       
        // Create a concrete ajax response:
        AjaxResponse response = new AjaxResponseImpl();
        // Add the action:
        response.addAction(action);
View Full Code Here

Examples of org.springmodules.xt.ajax.action.prototype.scriptaculous.Effect

        return response;
    }
   
    public AjaxResponse shrinkElement(AjaxActionEvent event) {
        // Create an ajax action for shrinking an element:
        Effect action = new Effect("Shrink", "toApplyEffect");
       
        // Create a concrete ajax response:
        AjaxResponse response = new AjaxResponseImpl();
        // Add the action:
        response.addAction(action);
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.