I was just wondering if I wrote the programming correctly to use a variable in another actor
In one sprite I have:
In the second there's:
public static boolean jumping;
/**
* Act - do whatever the BottomSensor wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
public void act()
{
if(isTouching(Block.class))
{
jumping=false;
}
else
{
jumping=true;
}
private boolean jumping=BottomSensor.jumping;
/**
* Act - do whatever the Terrahead wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
public void act()
{
jumping=BottomSensor.jumping;
}

