java.lang.NullPointerException
at NBullet.checkBullet(NBullet.java:45)
at NBullet.act(NBullet.java:25)
pls help me
public class NBullet extends Bullet
{
public NBullet()
{
speed= 50;
}
/**
* Act - do whatever the NBullet wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
public void act()
{
shootingspeed();
checkBullet();
}
public void checkBullet()
{
Weapon w = new Weapon();
Zombie z = new Zombie();
Actor zombie = this.getOneIntersectingObject(Zombie.class);
if(zombie != null )
{
getWorld().removeObject(this);
getWorld().removeObject(zombie);
}
else if ( getX() <= 0|| getY()==0||getY() == 774)
{
getWorld().removeObject(this);
}
}
}
