this is my code and it keeps saying that i am reffering to a non static method in a static way. How do i fix this.
public void act()
{
if(Greenfoot.mouseClicked(this))
{
CannonBall cannonball = new CannonBall();
getWorld().addObject(cannonball, CannonBarrel.getXCB(), CannonBarrel.getYCB());
cannonball.setRotation(CannonBarrel.getRotationCB());
cannonball.move(4);
}
} public int getRotationCB(){
return getRotation();
}
public int getXCB(){
return getX();
}
public int getYCB(){
return getY();
}


