Package ca.nengo.ui.lib.world

Examples of ca.nengo.ui.lib.world.WorldSky


    if (target.isDestroyed()) {

      return;
    }

    WorldSky camera = target.getWorld().getSky();

    Rectangle2D followBounds = target.objectToSky(target.getBounds());

    double x = followBounds.getX() - ((getWidth() - followBounds.getWidth()) / 2f);
    double y = followBounds.getY() + followBounds.getHeight();

    if (x + getWidth() > camera.getBounds().getWidth()) {
      x = camera.getBounds().getWidth() - getWidth();
    }

    if (x < 0) {
      x = 0;
    }
    if ((y + getHeight() > camera.getBounds().getHeight())
        && ((followBounds.getY() - getHeight()) > 0)) {
      y = followBounds.getY() - getHeight();

    }
View Full Code Here

TOP

Related Classes of ca.nengo.ui.lib.world.WorldSky

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.