How can I make variables between objects? I am trying to make it so when I press a button, it will change a value in an array in another object. Are there better ways to do this? Thanks.
if (Greenfoot.mouseClicked(objOne)) objTwo.setArrayValue(index, value);
if (Greenfoot.mouseClicked(objOne)) objTwo.setArrayValue(index, value);
public static int my_var = 5;