Advanced JS. Need some help!
I'v created a Button function and defined Scene , and called it already . When I press a certain button , the scene changed to a certain one.
draw = function() {
if (Scene === 2) {
Button2.draw();
}
if (Scene === 3) {
Button3y.draw();
Button3n.draw();
}
if (Scene === 4) {
Button4y.draw();
Button4n.draw();
}
};
However,when the scene turns to 4 (Scene4), the button on the scene 3 still appears and the buttons I drawn on Scene4 doesn't appear( the buttons are still usable on Scene4).
II don't know how to make it and I'd appreciate if you can answer my question.
Влезте в услугата, за да оставите коментар.