public void update(GameTime pGameTime) { mAttackTimer += pGameTime.elapseGameTime(); if (mAttack) { Vector2f lDirection = new Vector2f( mAttackVector.x + mGameWorldScreen.gameCamera().getPosition().x - 400, mAttackVector.y + mGameWorldScreen.gameCamera().getPosition().y - 320); float ltx = mControllingCharacter.x() + mControllingCharacter.width() * .5f; float lty = mControllingCharacter.y() + mControllingCharacter.height() * .5f; lDirection.sub(ltx, lty); lDirection.nor(); lDirection.mul(10f); mGameWorldScreen .fireBallParticles() .addParticle(ltx, lty, lDirection.x, lDirection.y, new Sprite(0, 0, 32, 32)); mAttack = false; } }