Back to project page libgdx-demo-pax-britannica.
The source code is released under:
Copyright (c) 2010 Ben Abraham, Renaud B?dard, Henk Boom, Daniel Burton, Matthew Gallant Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated ...
If you think the Android project libgdx-demo-pax-britannica listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package de.swagner.paxbritannica; //from w w w. j a v a 2s . c o m import com.badlogic.gdx.graphics.g2d.Batch; import com.badlogic.gdx.math.Vector2; public class Bullet extends Ship { private float buffer = 500; public float damage=0; public float bulletSpeed = 0f; public Bullet(int id, Vector2 position, Vector2 facing) { super(id, position, facing); } @Override public void draw(Batch batch) { if(alive == false) return; if( !Targeting.onScreen(collisionCenter,buffer)) { alive = false; } else if(velocity.len()<=5) { alive = false; GameInstance.getInstance().explosionParticles.addTinyExplosion(collisionCenter); } else { super.draw(batch); } } }