Hi again.
So, is it possible to use an instance variable, defined in another class, to use it in an if-statement, in the second class?
public void fd_special_spist()
{
ormeSpist;
}private int xyz;
public int getXyz()
{
return xyz;
}A a = (A) getWorld().getObjects(A.class).get(0);
A a = (A) getOneIntersectingObject(A.class);
if (a != null) //only when it touches A for example
{
int zyx = a.getXyz(); //or whatever you want to do with it
//...
}public void nd_missil()
{
Player_1 a = (Player_1) getWorld().getObjects(Player_1.class).get(0);
if (//I want it to continue if ormeSpist == 3)
{
getWorld().addObject (new ND(), getX(), getY());
}
}if (a != null && a.ormeSpist == 3)
if (a.ormeSpist == 3)
public int getOrmeSpist()
{
return ormeSpist;
}if (a != null && a.getOrmeSpist() == 3) //or if (a.getOrmeSpist() == 3)