This site requires JavaScript, please enable it in your browser!
Greenfoot back
petyritonel
petyritonel wrote ...

2019/2/27

adding the same actor twice/more times

petyritonel petyritonel

2019/2/27

#
i have 3 actors, that need to be added to the screen in order, more than 3 times. the first three of them is distinct, but the 4th one is an already used actor, and it can't be added to the world. I have all 3 of them declared. how could i make this happen?
Himsul Himsul

2019/2/27

#
World obj = getWorld();
Actor FirstActor1 = new FirstActor();
Actor FirstActor2 = new FirstActor();

obj.addObject(FirstActor1, x, y); 
obj.addObject(FirstActor2,x1,y1);

// x, y = coordonates.
petyritonel petyritonel

2019/2/27

#
thank you
You need to login to post a reply.