Hello. I want to know if there is a way to add a different object depending on the value of a variable? So if the variable is 1 add Object1, if it's 2 add Object2 and so on... Is it possible WITHOUT writing an if statement for every single object?
Actor a[] = {new Actor0(), new Actor1(), new Actor2()};
// when you want to add one
/*getWorld().*/addObject(a[theVariable], 100, 200);