Package com.badlogic.gdx.math

Examples of com.badlogic.gdx.math.Rectangle


  public Bomb(float x, float y, float speed) {
   
    super(x, y, speed);
   
    texture = ResourceManager.getTexture("bomb");
    setRect(new Rectangle(x, y, texture.getWidth(), texture.getHeight()));
  }
View Full Code Here


 
  public Shield(float x, float y, float speed) {
   
    super(x, y, speed);
    this.texture = ResourceManager.getTexture("shield");
    setRect(new Rectangle(x, y, this.texture.getWidth(), this.texture.getHeight()));
  }
View Full Code Here

   */
  public Stone(float x, float y, float speed) {
    super(x, y, speed);
 
    animation = ResourceManager.getAnimation("stone");
    setRect(new Rectangle(x, y, Constants.STONE_WIDTH, Constants.STONE_HEIGHT));
  }
View Full Code Here

    super(SPEED, rotation, width, height, position);
    fireRate = 4;
    this.damage = damage;
    setActive(true);
    health = 1;
    influence = new Rectangle(position.x - ((width * INFLUENCE_SCALE) / 2), position.y
        + ((height * INFLUENCE_SCALE) / 2), width * INFLUENCE_SCALE, height * INFLUENCE_SCALE);
    dead = false;
    this.lives = startingLives;
    this.infoBox = infoBox;

View Full Code Here

  public void dropBomb() {
    bombDropped = true;
    bombs--;
    bombTimer = 0;
    bomb = new Rectangle(getPosition().x + (width / 2), getPosition().y + (height / 2), Configuration.gameScale, Configuration.gameScale);

  }
View Full Code Here

  public SmoothMoveTo(MovableEntity entity, Vector2 destinationPoint, float speed) {
    setDone(false);
    this.destinationPoint = destinationPoint;
    this.entity = entity;
    this.speed = speed;
    this.destinationRec = new Rectangle(destinationPoint.x - (1f * Configuration.gameScale / 2), destinationPoint.y
        - (1f * Configuration.gameScale / 2), 1f * Configuration.gameScale, 1f * Configuration.gameScale);

  }
 
View Full Code Here

  public MoveTo(MovableEntity entity, Vector2 destinationPoint) {
    setDone(false);
    this.destinationPoint = destinationPoint;
    this.entity = entity;
    this.destinationRec = new Rectangle(destinationPoint.x, destinationPoint.y, 1f * Configuration.gameScale,
        1f * Configuration.gameScale);
  }
 
View Full Code Here

  public Entity(Vector2 position, float width, float height) {
    this.position = position;
    this.width = width;
    this.height = height;
    bounds = new Rectangle(position.x, position.y, width, height);
  }
View Full Code Here

        }
       
      }

      String name = packPrefix + c;
      Rectangle rect = packer.pack(name, pixmap);
     
      //determine which page it was packed into
      int pIndex = packer.getPageIndex(name);
      if (pIndex==-1) //we should not get here
        throw new IllegalStateException("packer was not able to insert '"+name+"' into a page");
View Full Code Here

 
  public Entity(Vector2 position, float width, float height){
    this.position = position;
    this.width = width;
    this.height = height;
    bounds = new Rectangle(position.x, position.y, width, height);
  }
View Full Code Here

TOP

Related Classes of com.badlogic.gdx.math.Rectangle

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.