I'm trying to change the background image to a scenario dynamically - ie when a room variable changes value.
This code compiles when placed in a maze subclass of the World, but I get a "non-static method cannot be referenced from a static context" error when I place the code in an actor subclass. Can anyone help / explain?
int room = 1;
setBackground(backgroundarray);
backgroundarray is a string array which has been declared and populated in the maze subclass
int room =1;
maze.setBackground(maze.backgroundarray);
gives me the error if I place it in an actor subclass.
![Twitter](/assets/twitter-4e19209ef84344ee0c433f4c7bad8d49.png)
![Twitter.hover](/assets/twitter.hover-1fb19a5bafc50deace8f88eaec867845.png)