@Override
    public void collidedWith(Entity other) {
        // prevents double kills, if we've already hit something,
        // don't collide
        if (used) {
            return;
        }
        
        // if we've hit an alien, kill it!
        if (other instanceof AlienEntity && shotType==0) {
            // remove the affected entities
            try{
            ((AlienEntity) other).alienKilled(shotDmg);
            } catch(Exception e) {
                game.removeEntity(other);
            }
            game.removeEntity(this);
            
            // notify the game that the alien has been killed
            used = true;
        } else if (other instanceof ShipEntity && shotType==1){
        	((ShipEntity)game.getShip()).tookDamage(shotDmg);
            game.removeEntity(this);
        }
    }