Package com.badlogic.gdx.math

Examples of com.badlogic.gdx.math.Vector2


    return new LargeEnemySquiggle(10f * Configuration.gameScale, 0, 2f * Configuration.gameScale,
        2f * Configuration.gameScale, spawnPoint, cooldown, fireRate, variation, LargeEnemyBurst.BASE_HEALTH);
  }

  protected LargeEnemy getLargeEnemySquiggle(int x, int y, int cooldown, float fireRate, String variation) {
    Vector2 spawnPoint = new Vector2(x * Configuration.gameScale, y * Configuration.gameScale);
    return getLargeEnemySquiggle(spawnPoint, cooldown, fireRate, variation);

  }
View Full Code Here


    return new LargeEnemySplit(10f * Configuration.gameScale, 0, 2f * Configuration.gameScale,
        2f * Configuration.gameScale, spawnPoint, cooldown, fireRate, variation, LargeEnemyBurst.BASE_HEALTH);
  }

  protected LargeEnemy getLargeEnemySplit(int x, int y, int cooldown, float fireRate, String variation) {
    Vector2 spawnPoint = new Vector2(x * Configuration.gameScale, y * Configuration.gameScale);
    return getLargeEnemySplit(spawnPoint, cooldown, fireRate, variation);

  }
View Full Code Here

  public void setEnemyTimes(Array<Integer> enemyTimes) {
    this.enemyTimes = enemyTimes;
  }

  protected Vector2 getTopLeft() {
    return new Vector2(0 * Configuration.gameScale, 23 * Configuration.gameScale);
  }
 
View Full Code Here

  protected Vector2 getTopLeft() {
    return new Vector2(0 * Configuration.gameScale, 23 * Configuration.gameScale);
  }

  protected Vector2 getTopRight() {
    return new Vector2(20 * Configuration.gameScale, 23 * Configuration.gameScale);
  }
 
View Full Code Here

  protected Vector2 getTopRight() {
    return new Vector2(20 * Configuration.gameScale, 23 * Configuration.gameScale);
  }

  protected Vector2 getMidLeft() {
    return new Vector2(0 * Configuration.gameScale, 16 * Configuration.gameScale);
  }
 
View Full Code Here

 
  public MovableEntity(float SPEED, float rotation, float width, float height, Vector2 position) {
    super(position, width, height);
    this.SPEED = SPEED;
    this.rotation = rotation;
    velocity = new Vector2(0, 0);
   
  }
View Full Code Here

  }

  public void shootBurst(World world, Ship ship, float bulletScale) {

    float originalAngle = new Vector2(ship.getPosition().tmp().sub(getPosition()).nor()).angle();

    for (float i = originalAngle - (burstSpread / 2); i <= originalAngle + (burstSpread / 2); i += (burstSpread / burstCount)) {

      float angle = i;
      Bullet bullet = getBasicBullet(ship, bulletScale);
View Full Code Here

  protected Vector2 getMidLeft() {
    return new Vector2(0 * Configuration.gameScale, 16 * Configuration.gameScale);
  }

  protected Vector2 getMidRight() {
    return new Vector2(20 * Configuration.gameScale, 16 * Configuration.gameScale);
  }
 
View Full Code Here

  }

  public void shootSplitBurst(World world, Ship ship, float bulletScale) {

    float originalAngle = new Vector2(ship.getPosition().tmp().sub(getPosition()).nor()).angle();

    for (float i = originalAngle - (burstSpread / 2); i <= originalAngle + (burstSpread / 2); i += (burstSpread / burstCount)) {

      float angle = i;
      Bullet bullet = getBasicBullet(ship, bulletScale);
View Full Code Here

  }

  private Bullet getBasicBullet(Ship ship, float bulletScale) {
    return new EnemyBasicBullet(EnemyBasicBullet.BULLETSPEED, 0, .5f * bulletScale * Configuration.gameScale,
        .5f * bulletScale* Configuration.gameScale, new Vector2(getPosition().x + getWidth() / 2, getPosition().y
            + getHeight() / 2), new Vector2(ship.getPosition().tmp().sub(getPosition()).nor()),
        this.variation);
  }
View Full Code Here

TOP

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

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.