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

2021/3/21

AddedToWorld() method

Roshan123 Roshan123

2021/3/21

#
Plz give me the easiest and mostly used example of using AddedToWorld method.....(when,how and where to use???) Plz provide the code
danpost danpost

2021/3/21

#
Roshan123 wrote...
Plz give me the easiest and mostly used example of using AddedToWorld method.....(when,how and where to use???) Plz provide the code
It is only needed in an Actor subclass when initialization of an Actor object cannot be completed prior to when it is added into a world.
Roshan123 Roshan123

2021/3/21

#
danpost wrote...
It is only needed in an Actor subclass when initialization of an Actor object cannot be completed prior to when it is added into a world.
Ok thanks. So can i call it a bug in greenfoot or lack of knowledge by me
danpost danpost

2021/3/21

#
Roshan123 wrote...
can i call it a bug in greenfoot or lack of knowledge by me
It's not a bug in greenfoot. It is provided as an empty method by greenfoot (just like the act method). Both are called internally by greenfoot (at appropriate times). Both are available to be over-ridden to add some implementation to them (have them actually do something).
You need to login to post a reply.