public Bomb addBomb(float angle) { float tX = (float) (posX() + (3 * Config.CAMERA_WIDTH * Math.cos(angle * DEG_TO_PI - PI / 2))); float tY = (float) (posY() + (3 * Config.CAMERA_WIDTH * Math.sin(angle * DEG_TO_PI - PI / 2))); return new Bomb( new PointF(posX(), posY()), new PointF(tX, tY), angle, mResourceManager.getBomb(), mResourceManager.getVertexBufferObjectManager()); }
public Bullet addBullet(float sX, float sY, float angle) { float tX = (float) (sX + (Config.CAMERA_WIDTH * Math.cos(angle * DEG_TO_PI - PI / 2))); float tY = (float) (sY + (Config.CAMERA_WIDTH * Math.sin(angle * DEG_TO_PI - PI / 2))); return new Bullet( new PointF(sX, sY), new PointF(tX, tY), angle, mResourceManager.getBullet(), mResourceManager.getVertexBufferObjectManager()); }
public ArmedMovingObject( PointF point, TextureRegion textureRegion, ResourceManager resourceManager) { super(point, textureRegion, resourceManager.getVertexBufferObjectManager()); mResourceManager = resourceManager; mAlive = true; }