This site requires JavaScript, please enable it in your browser!
Greenfoot
Username
Password
Remember Me?
Sign Up, Lost Password
Activity
About
Documentation
Download
Discuss
Scenarios
Discussions
You need to login to take part
Current Discussions
How to detect what object is currently using a global method?
By UnclePedro, with 2 replies.
Last reply by danpost, over 12 years ago:
I think that all you need is to put an instance boolean variable in the Enemy class, call it 'reversed'. Each object created from that class or any subclass will have a copy of that field for its use. You can also add the following method within the Enemy class to return the state of any object of that class (or subclass): <Code Omitted>Just change the state of the 'reversed' field every time you turn the object around.
Leaves and Wombats - Random Leaves
By Gruff757, with 4 replies.
Last reply by Gruff757, over 12 years ago:
It works now. Thanks a lot vonmeth! =)
Add Object Question
By mncomic, with 8 replies.
Last reply by mncomic, over 12 years ago:
Thanks everyone for your help...
Creating Objects
By Johnathon, with 6 replies.
Last reply by Zamoht, over 12 years ago:
Oh of course. To be honest I didn't understand the question, but danpost's code is definitely an easier way to approach this problem.
why does this not work?
By theuberjew, with 12 replies.
Last reply by theuberjew, over 12 years ago:
Thank you for all your help my program runs fine now
Track skeleton on Greenfoot
By swapthomas, with no replies.
Hi, I installed the Kinect successfully. It has tracked my skeleton. I imported some of the Greenfoot examples that was on the Kinect page. How do I get my skeleton to appear on the Greenfoot console? Regards,
Custom Icon after Exporting .Jar File
By Avro, with 3 replies.
Last reply by Gevater_Tod4711, over 12 years ago:
I think it would be easyer to compile the .jar file into an .exe file. There it's simple to add an icon. I like the program JMadX. It's very simple but it works.
I have a problem with scoreboard
By DaBist, with 4 replies.
Last reply by DaBist, over 12 years ago:
danpost wrote...
If you want only one counter (Points) in the vsa class that all its subclasses share, you can use the 'static' keyword in the field declaration in the vsa class: <Code Omitted>My only concern is: why do you have a class and two subclasses for something that can be done in one single class; as only one has an image.
it works now. Thanks!
Help with Actor movement speed
By Sergio, with 7 replies.
Last reply by Sergio, over 12 years ago:
Hey mate sorry totally forgot to react yesterday, your previous option worked thank you so much man! Again! You're being a really big help :)
Key press question
By BradH, with 8 replies.
Last reply by danpost, over 12 years ago:
<Code Omitted>You have to supply the Class names to replace 'ObjectOne' and 'ObjectTwo' plus the rest.
cannot find symbol
By super_noob, with 6 replies.
Last reply by danpost, over 12 years ago:
Insert at line 3 of the code provided above the following line: <Code Omitted>By declaring a field within a class but outside any method like this, you are giving each instance created by that class a seperate field with that name to use. Of course, if you only create one instance of the class, there will only be one field with that name; but, it belongs to that object created (not to the class itself). EDIT: your welcome.
Help with shooting
By mncomic, with 16 replies.
Last reply by danpost, over 12 years ago:
That would have to be in the gun class as that is where you are determining when to shoot.
Kinect reusable on Xbos after installing for Greenfoot
By Antost, with 1 reply.
Replied to by davemib123, over 12 years ago:
for the x360 it is plug and play :)
Mouse Clicked from World
By Barador, with 3 replies.
Last reply by danpost, over 12 years ago:
The keyworld 'this' refers to an Object class object , so that would be one way to use it (if you want it to check for clicks on the current object whose method is being executed on).
explanination
By lonely.girl, with 5 replies.
Last reply by danpost, over 12 years ago:
The 'delay--;' is shorthand for 'delay = delay - 1;' or 'delay -= 1;' (they all do the same thing. Same with 'delay = delay + 1;', 'delay += 1;' and 'delay++;'.
907
908
909
910
911
912
913
X