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

2013/6/10

Scenario freezes when I change levels?

1
2
danpost danpost

2013/6/11

#
One thing you could do, if instances of one class are only created by a specific class, is to make the class an 'inner' or 'hidden' class of the class that creates them. They are also more formally referred to as 'nested' classes. For examples of how this works, please download my Time on Your Hands Demo and review the 'Ship' and 'Clock' classes, which each contain two inner classes. The 'Clock' class has a 'Hand' class and a 'Locator' class included in its code; and the 'Ship' class has a 'Shot' class and an 'AutoButton' class included in its code.
You need to login to post a reply.
1
2