Created
September 27, 2016 14:43
-
-
Save phunni/63fed97a2223a9d5b5832a5e865e4559 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void shootPlayerLaser() { | |
if (!gameOver && !showingWaveNumber) { | |
Laser laser = laserPool.obtain(); | |
laser.init("blue", playerShip.getPosition(), new Vector2(0, 15)); | |
lasers.add(laser); | |
playerPew.play(); | |
} | |
} | |
private void shootEnemyLaser(EnemyShip ship) { | |
if (!ship.isFalling()) { | |
Laser laser = laserPool.obtain(); | |
laser.init("green", ship.getCentre(), new Vector2(0, -9)); | |
lasers.add(laser); | |
enemyPew.play(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment