Hi! I am having problems when I am trying to call a method from another class. What I basically want to do is to create a platform (ground) of two different colors that can be activated and thus become solid by touching another object (a cloud of the same color as the platform). Otherwise I want them to be transparent. It is shown in the video
The Platform class extends Actor and the Cloud class extends Mover. So when I call my isSolid() method from Platform in Mover I get "cannot find symbol - method isSolid()"
How can I fix it?
Thanks in advance!
The code in Mover:
isSolid() in Platform:
/**
* Check if the Mover is on the ground, ie is standing on a platform.
*
* @return true if the Mover is on the ground, false if not.
*/
public boolean isOnGround()
{
boolean onGround = false;
Actor ground = getOneObjectAtOffset(0, getImage().getHeight()/2 , Platform.class);
if(ground != null && ground.isSolid())
{
moveOutOfGround(ground);
onGround = true;
}
return onGround;
}
public boolean isSolid()
{
boolean solid = true;
Girl girl = getOneIntersectingObject(Girl.class);
if(girl != null)
{
getObject(this).setTransparency(200);
solid = true;
}
return solid;
}
