I have the code for this monster to shoot, but for some reason it doesn't feel like putting a new shot into the world. This is the code
Did I do something incorrectly?
public void decideMoveShoot() { if(character != null) { //hypotenuse less that 225 away from player if(Math.sqrt(Math.abs((character.getY()-realYloc)*(character.getY()-realYloc) + ((character.getX()-realXloc)*(character.getX()-realXloc)))) < 225) { if(shotRecharge <= 0) { System.out.println("it should have fired"); //This is for debugging. Yes, this is triggered each time I get close. AnnoyanceShooterShot newshot = new AnnoyanceShooterShot(); //getWorld().addObject(new AnnoyanceShooterShot(), getY(), getX()); room.addObject(newshot, getY(), getX()); shotRecharge = shotRechargeTime; } } } }