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

2020/1/26

How to add multiple instances with animations coming from the both sides of the screeen

Adrian26 Adrian26

2020/1/26

#
Hello everyone,i just started learning Greenfoot and I am currently trying to instantiate a random number of Actors(some bats) from the left and right of the screen.They have flying animation and I i do not understand how to do that. I have the code for animation in the Bat.class and i think that is one of the problems,should i make an aray of variables so every Bat acts differently? Again,when i instantiate one it works perfect but when i try to instantiate multiple Bats from the left and right of the screen it won't instantiate anything at all.
danpost danpost

2020/1/26

#
Will need to see World subclass and Bat class codes.
You need to login to post a reply.