I have an integer(levelstatus
) in class A(LevelSelectScene
) and I want to change it in class B(GameScene
), is it possible?
here is my code:
(Code in GameScene)
public class levelComplete()
{
levelSelectScene.getInstance.levelstatus=1;
}
LevelSelectScene
has an public integer levelstatus
.
and after an event happens, levelComplete
will trigger and will change the value of levelstatus
from null to 1.