Examples of Sky


Examples of javara.world.environment.Sky

    this.rootNode = rootNode;
    this.physicsSpace = physicsSpace;
    this.assetManager = assetManager;

    this.sky = new Sky(assetManager, DEFAULT_SKY_COLOR, DEFAULT_HORIZON_COLOR, DEFAULT_HORIZON_SCALE, DEFAULT_GROUND_COLOR);
    this.ground = new Ground(assetManager, 1000.0f, DEFAULT_GROUND_COLOR);

    addWorldObject(this.sky);
    addWorldObject(this.ground);
View Full Code Here

Examples of javara.world.environment.Sky

          horizonScale = Float.parseFloat(attrs.getValue("horizonScale"));

        if (ambientColor != null)
          world.setAmbientColor(ambientColor);

        Sky sky = world.getSky();
        if (skyColor != null)
          sky.setColor(skyColor);
        if (horizonColor != null)
          sky.setHorizonColor(horizonColor);
        if (horizonScale >= 0)
          sky.setHorizonScale(horizonScale);
      }
      else if (localName.equalsIgnoreCase("ground")) {
        ColorRGBA groundColor = (attrs.getValue("color") != null) ? parseColor(attrs.getValue("color")) : null;
        Ground ground = world.getGround();
        Sky sky = world.getSky();

        if (groundColor != null) {
          ground.setColor(groundColor);
          sky.setGroundColor(groundColor);
        }
      }
      else if (localName.equalsIgnoreCase("celestial")) {
        ColorRGBA color;
        float azimuth = 90.0f, elevation = 45.0f, intensity = 0.4f, size = 1.0f;
View Full Code Here

Examples of net.anzix.fsz.sceneComponents.Sky

        addStaticModels();
       
        final Node reflectedNode = new Node("reflectNode");
       
        // SKY
        sky = new Sky(WATER_HEIGHT);
        reflectedNode.attachChild(sky);
        reflectedNode.attachChild(voxelPoolContainer.getNode());
        reflectedNode.attachChild(staticObjectNode);
       
        // WATER
View Full Code Here

Examples of net.anzix.fsz.sceneComponents.Sky

            ex1.printStackTrace();
        }

        final Node reflectedNode = new Node("reflectNode");
        reflectedNode.attachChild(terrain);
        sky = new Sky(0.0f);
        reflectedNode.attachChild(sky);

        //water = new Water(camera, reflectedNode, sky, farPlane,0);

        root.attachChild(reflectedNode);
View Full Code Here

Examples of org.spout.vanilla.component.world.sky.Sky

    }
    player.add(PlayerItemCollector.class);
    player.add(Sleep.class);
    player.add(Level.class);
    player.getNetwork().getSession().setUncaughtExceptionHandler(new PasteExceptionHandler(player.getNetwork().getSession()));
    Sky sky = player.getWorld().get(Sky.class);
    if (sky != null) {
      sky.updatePlayer(player);
    }
  }
View Full Code Here

Examples of org.spout.vanilla.component.world.sky.Sky

      return;
    }

    final Block head = getCorrectHalf(block, true);
    final World world = player.getWorld();
    final Sky sky = world.get(Sky.class);

    for (Entity e : world.getNearbyEntities(player, NEARBY_MONSTER_RANGE)) {
      if (e.get(Living.class) instanceof Hostile) {
        player.sendMessage(NEARBY_MONSTER_MESSAGE);
        return;
      }
    }

    if (sky != null && sky.getTime() < Time.DUSK.getTime()) {
      player.sendMessage(NOT_NIGHT_MESSAGE);
      return;
    }

    if (isOccupied(head)) {
View Full Code Here

Examples of org.spout.vanilla.component.world.sky.Sky

      }
    }
    World world = args.popWorld("world", source);
    args.assertCompletelyParsed();

    Sky sky = world.get(Sky.class);
    if (sky == null) {
      throw new CommandException("The sky for " + world.getName() + " is not available.");
    }
    sky.setTime(relative ? (sky.getTime() + time) : time);
    if (getEngine() instanceof Client) {
      source.sendMessage(plugin.getPrefix() + ChatStyle.GREEN + "You set "
          + ChatStyle.WHITE + world.getName() + ChatStyle.GREEN
          + " to time: " + ChatStyle.WHITE + sky.getTime());
    } else {
      ((Server) getEngine()).broadcastMessage(plugin.getPrefix() + ChatStyle.WHITE
          + world.getName() + ChatStyle.GREEN + " set to: " + ChatStyle.WHITE + sky.getTime());
    }
  }
View Full Code Here

Examples of org.spout.vanilla.component.world.sky.Sky

  public void weather(CommandSource source, CommandArguments args) throws CommandException {
    Weather weather = args.popEnumValue("weather", Weather.class);
    World world = args.popWorld("world", source);
    args.assertCompletelyParsed();

    Sky sky = world.get(Sky.class);
    if (sky == null) {
      throw new CommandException("The sky of world '" + world.getName() + "' is not available.");
    }

    sky.setWeather(weather);
    String message;
    switch (weather) {
      case RAIN:
        message = plugin.getPrefix() + ChatStyle.GREEN + "Weather set to " + ChatStyle.WHITE + "RAIN/SNOW" + ChatStyle.GREEN + ".";
        break;
View Full Code Here

Examples of org.spout.vanilla.component.world.sky.Sky

    return getFireTick() >= 0 && !health.isDead();
  }

  @Override
  public void onTick(float dt) {
    Sky sky = getOwner().getWorld().get(Sky.class);
    Point point = getOwner().getPhysics().getPosition();
    if (sky != null && sky.hasWeather()) {
      if (sky.getWeatherSimulator().isRainingAt((int) point.getX(), (int) point.getY(), (int) point.getZ(), false)) {
        rainTimer += dt;
      } else {
        rainTimer = 0f;
      }
      if (rainTimer >= 2.0f) {
View Full Code Here

Examples of org.spout.vanilla.component.world.sky.Sky

  @Override
  public void handleClient(ClientSession session, PlayerTimeMessage message) {
    Player player = session.getPlayer();
    World world = player.getWorld();

    Sky sky = world.add(Sky.class);
    sky.setTime(message.getTime());
  }
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.