So I am trying to refer to a boolean, SHIELD, in another Actor.
Here is the Actor I am trying to get the boolean into:
And this is the Actor with SHIELD I am trying to get it from.
I've tried all sorts of stuff but as a Greenfoot Novice I'm rather lost. Any help would be greatly appreciated.
import greenfoot.*;
public class Enemy extends Scrollers
{import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
public class Enemy extends Scrollers
{
public void kill()
{
if(isTouching(Hero.class) == true)
{
removeTouching(Hero.class);
DeathScreen go = new DeathScreen();
Greenfoot.setWorld(go);
}
}
}import greenfoot.*;
public class Hero extends Actor
{
public boolean SHIELD = false;
}

