Android Open Source - crash-landing Landing Pad






From Project

Back to project page crash-landing.

License

The source code is released under:

MIT License

If you think the Android project crash-landing listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.balitechy.crashlanding.models;
//from ww  w. j  a  v  a  2s .  c o m
import com.badlogic.gdx.Game;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.Texture.TextureFilter;
import com.badlogic.gdx.graphics.g2d.Batch;
import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.scenes.scene2d.InputEvent;
import com.badlogic.gdx.scenes.scene2d.InputListener;
import com.badlogic.gdx.scenes.scene2d.Touchable;
import com.balitechy.crashlanding.GameAudio;
import com.balitechy.crashlanding.screens.GameScreen;

public class LandingPad extends BaseObject {
  
  public static final float HEIGHT = 50;

  public LandingPad(Vector2 position, float width, float height) {
    super(position, width, height);
    
    texture = new Texture(Gdx.files.internal("data/landing_area.png"));
    texture.setFilter(TextureFilter.Linear, TextureFilter.Linear);
  }
  

  @Override
  public void draw(Batch batch, float parentAlpha) {
    batch.draw(texture, position.x, position.y, width, height);
  }

  @Override
  public void dispose() {
    texture.dispose();
  }

}




Java Source Code List

com.balitechy.crashlanding.CrashLanding.java
com.balitechy.crashlanding.GameAudio.java
com.balitechy.crashlanding.GameUtils.java
com.balitechy.crashlanding.MainActivity.java
com.balitechy.crashlanding.Main.java
com.balitechy.crashlanding.models.Accelerator.java
com.balitechy.crashlanding.models.BaseObject.java
com.balitechy.crashlanding.models.FuelMeter.java
com.balitechy.crashlanding.models.LandingPad.java
com.balitechy.crashlanding.models.MovableObject.java
com.balitechy.crashlanding.models.SpaceShip.java
com.balitechy.crashlanding.screens.GameResult.java
com.balitechy.crashlanding.screens.GameScreen.java
com.balitechy.crashlanding.screens.HomeScreen.java