i want to add a new version of my actor to the world with specific variables which can change depending on where the method is called. I tried ...
Actor temp = new Tower();
getWorld().addObject(temp,50,50);
temp.get("TW-CRT.png","AM-CRT.png",5,30,1,1,200);
and in the Tower actor -
String image = "";
String ammo = "";
int rate = 0;
int range = 0;
int splash = 0;
int type = 0;
int price = 0;
public void get(String im,String am,int rt,int rg,int sp,int tp,int pr)
{
image = im; ammo=am; rate=rt; range=rg; splash = sp; type =tp; price = pr;
}
That didn't work. can someone please tell me how to do this?