Example usage for com.badlogic.gdx.graphics.g2d Sprite Sprite

List of usage examples for com.badlogic.gdx.graphics.g2d Sprite Sprite

Introduction

In this page you can find the example usage for com.badlogic.gdx.graphics.g2d Sprite Sprite.

Prototype

public Sprite() 

Source Link

Document

Creates an uninitialized sprite.

Usage

From source file:com.cogjam.game.bubblepop.BalloonActor.java

public BalloonActor() {
    sprite = new Sprite();
}

From source file:com.jupiter.europa.entity.component.RenderComponent.java

License:Open Source License

public RenderComponent() {
    this.setOffset(new Point(0, 0));
    this.setSprite(new Sprite());
}

From source file:com.jupiter.europa.entity.trait.feat.GreatFortitude.java

License:Open Source License

@Override
public Sprite getIcon() {
    return new Sprite();
}

From source file:com.maplescot.loggerbill.game.world.Bill.java

License:Creative Commons License

public Bill() {
    billSprite = new Sprite();
    billSprite.setSize(145, 192);//  w ww .j a va 2 s  . com
    billGraveSprite = new Sprite(Assets.getInstance().tombstoneRegion);

    billSprite.setCenterX(BILL_DISTANCE * billSide);
    billGraveSprite.setY(BILL_HEIGHT);
    billGraveSprite.setCenterX(BILL_DISTANCE * billSide);
}

From source file:com.maplescot.loggerbill.game.world.Bird.java

License:Creative Commons License

public Bird() {
    x = -(VIEW_WIDTH) - (rnum.nextFloat() * VIEW_WIDTH);
    y = 200 + rnum.nextFloat() * (VIEW_HEIGHT - 250);
    speed = 100f;//  w ww  . j  a va  2  s  .com
    if (rnum.nextInt(10) < 5) {
        speed = -speed;
        x = -x;
        dir = -dir;

    }
    Gdx.app.debug(TAG, "Spawning bird " + dir);
    stateTime = 0f;
    birdSprite = new Sprite();
    birdSprite.setSize(32, 32);
}

From source file:com.mygdx.game.Player.player.java

public player() {

    t = new Texture(Gdx.files.internal("player.png"));
    definetextureregions(t);/*ww w.  j  ava2  s.  c  om*/
    pl = new Sprite();
    bf = new BitmapFont();

}

From source file:genuini.entities.AccessPoint.java

public AccessPoint(GameScreen screen, Body body, int ID, String type, String name, String linkedMapName,
        String linkedAccessPointName) {
    super(screen, body, ID);
    active = true;/*  www. j a v  a 2 s. com*/
    this.type = type;
    this.name = name;
    createFilter();
    this.linkedMapName = linkedMapName;
    this.linkedAccessPointName = linkedAccessPointName;
    sprite = new Sprite();
    sprite.setPosition(position.x, position.y);

}

From source file:genuini.entities.MobSpawnPoint.java

public MobSpawnPoint(GameScreen screen, Body body, int ID, String mobType, float area, int maxMobs) {
    super(screen, body, ID);
    active = true;//w ww .j  a va 2 s.  c o  m
    createFilter();
    sprite = new Sprite();
    sprite.setPosition(position.x, position.y);
    stateTime = 0;

    if (mobType.equals("slime")) {
        this.mobType = MobType.SLIME;
    } else if (mobType.equals("snail")) {
        this.mobType = MobType.SNAIL;
    } else {
        this.mobType = MobType.SNAIL;
    }

    this.area = area;
    this.maxMobs = maxMobs;

    mobs = new Array<Mobs>();
}

From source file:seventh.client.gfx.effects.ClientGameEffects.java

License:Open Source License

/**
 *//*  w w  w .  j a v  a  2 s  . co  m*/
public ClientGameEffects(Random random) {

    this.frameBufferRenderables = new ArrayList<>();
    this.hurtEffect = new HurtEffect();

    this.backgroundEffects = new Effects();
    this.foregroundEffects = new Effects();

    this.playerBloodEmitters = new Emitter[SeventhConstants.MAX_PLAYERS * 3];
    for (int i = 0; i < this.playerBloodEmitters.length; i++) {
        this.playerBloodEmitters[i] = Emitters.newBloodEmitter(new Vector2f(), 5, 10_000, 30).kill();
    }

    this.lightSystem = new ImageBasedLightSystem();
    this.frameBufferRenderables.add(lightSystem);

    this.explosions = new ExplosionEffect(15, 800, 0.6f);
    this.frameBufferSprite = new Sprite();

    this.trackMarks = new TankTrackMarks[SeventhConstants.MAX_ENTITIES];

    this.bulletCasings = new BulletCasingEffect[256];
    for (int i = 0; i < this.bulletCasings.length; i++) {
        this.bulletCasings[i] = new BulletCasingEffect(random);
    }
}

From source file:seventh.client.gfx.effects.particle_system.ParticleData.java

License:Open Source License

public ParticleData(int maxParticles) {
    this.maxParticles = maxParticles;
    this.numberOfAliveParticles = 0;

    this.pos = new Vector2f[maxParticles];
    this.vel = new Vector2f[maxParticles];
    this.isAlive = new boolean[maxParticles];
    this.timeToLive = new Timer[maxParticles];
    this.scale = new float[maxParticles];
    this.rotation = new float[maxParticles];
    this.speed = new float[maxParticles];
    this.color = new Color[maxParticles];
    this.sprite = new Sprite[maxParticles];

    for (int i = 0; i < maxParticles; i++) {
        this.pos[i] = new Vector2f();
        this.vel[i] = new Vector2f();
        this.timeToLive[i] = new Timer(false, 0);
        this.color[i] = new Color(1, 1, 1, 1);
        this.sprite[i] = new Sprite();

        this.scale[i] = 1.0f;
    }//from w w  w  .jav a 2s. c o m

}