Package com.riley.angrymasons.Model

Source Code of com.riley.angrymasons.Model.Entity

package com.riley.angrymasons.Model;

import com.badlogic.gdx.math.Rectangle;
import com.badlogic.gdx.math.Vector2;

public abstract class Entity {
  protected Vector2 position;
  protected float width;
  protected float height;
  protected Rectangle bounds;
 
  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);
  }
 
  /**
   * @return the position
   */
  public Vector2 getPosition() {
    return position;
  }
 
  /**
   * @param position the position to set
   */
  public void setPosition(Vector2 position) {
    this.position = position;
  }
 
  /**
   * @return the width
   */
  public float getWidth() {
    return width;
  }
 
  /**
   * @param width the width to set
   */
  public void setWidth(float width) {
    this.width = width;
  }
 
  /**
   * @return the height
   */
  public float getHeight() {
    return height;
  }
 
  /**
   * @param height the height to set
   */
  public void setHeight(float height) {
    this.height = height;
  }
 
  /**
   * @return the bounds
   */
  public Rectangle getBounds() {
    return bounds;
  }
 
  /**
   * @param bounds the bounds to set
   */
  public void setBounds(Rectangle bounds) {
    this.bounds = bounds;
  }
}
TOP

Related Classes of com.riley.angrymasons.Model.Entity

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.