Package com.entities
Class Alien
- java.lang.Object
-
- com.badlogic.gdx.graphics.g2d.TextureRegion
-
- com.badlogic.gdx.graphics.g2d.Sprite
-
- com.entities.Alien
-
public class Alien extends com.badlogic.gdx.graphics.g2d.SpriteAlien is a really simple sprite which also keeps track of how long it has been alive, and gives it certain properties depending onConstants.AlienType
-
-
Field Summary
Fields Modifier and Type Field Description Constants.AlienTypetype
-
Constructor Summary
Constructors Constructor Description Alien(Constants.AlienType type, com.badlogic.gdx.math.Vector2 position)Constructor for Alien, which is called to spawn at a random position, remains there for a certain amount of time, and gives a certain amount of score depending on the type
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetScore()longgetSpawnTime()-
Methods inherited from class com.badlogic.gdx.graphics.g2d.Sprite
draw, draw, flip, getBoundingRectangle, getColor, getHeight, getOriginX, getOriginY, getRotation, getScaleX, getScaleY, getVertices, getWidth, getX, getY, rotate, rotate90, scale, scroll, set, setAlpha, setBounds, setCenter, setCenterX, setCenterY, setColor, setColor, setFlip, setOrigin, setOriginBasedPosition, setOriginCenter, setPackedColor, setPosition, setRegion, setRotation, setScale, setScale, setSize, setU, setU2, setV, setV2, setX, setY, translate, translateX, translateY
-
Methods inherited from class com.badlogic.gdx.graphics.g2d.TextureRegion
getRegionHeight, getRegionWidth, getRegionX, getRegionY, getTexture, getU, getU2, getV, getV2, isFlipX, isFlipY, setRegion, setRegion, setRegion, setRegion, setRegionHeight, setRegionWidth, setRegionX, setRegionY, setTexture, split, split
-
-
-
-
Field Detail
-
type
public final Constants.AlienType type
-
-
Constructor Detail
-
Alien
public Alien(Constants.AlienType type, com.badlogic.gdx.math.Vector2 position)
Constructor for Alien, which is called to spawn at a random position, remains there for a certain amount of time, and gives a certain amount of score depending on the type- Parameters:
type- gives properties of the alienposition- where it spawns on the screen
-
-