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

2014/6/5

Use var from method in act() in world class

1
2
3
mrunknown mrunknown

2014/6/10

#
Uh okay, i had that in the first place but then i thought it might be difficult to call methods from 'Main' in 'Plane' or am i wrong?
danpost danpost

2014/6/10

#
If you use 'static' fields and methods in your Main class for the scores and names, you will be able to change them directly from the Plane class using 'Main.staticMethodName()' or 'Main.staticFieldName'. My Pushy Woman scenario has an example of how that works in the Maze class (I think that is where the 'static' fields for best scores are located).
You need to login to post a reply.
1
2
3