I need to access a variable from another class. this works for one of them, but for some reason the second variable is not changing.
That is the second variable with does not work,
in this example the method does work.
did I make a syntax mistake or something ?
Spieler1 Spieler1; public void act() { if(Greenfoot.isKeyDown("d")) { setLocation(getX() + 3, getY()); if(Spieler1.Kollision1 == true) {setLocation(getX() - 3, getY());} }
if(Spieler1.Leben1 == 3) { setImage("Lebensanzeige1_3.png"); }