Quote:
Originally Posted by NeoCorps
Block Structure as in a block of code from a segment of the program. We did it today in class but I didn't write it down and now I'm stuck :P
How would I join the block structures together? Or "methods", thanks.
Edit: Sorry I don't think I explained it correctly. I'm trying to call a variable on another method.
|
You can't join "methods" together, but you can write separate methods, and then put each of these methods into the main method. (It works exactly the same way as putting any other chunk of code like a "move" method in, but it is a method, built off of methods, if you get what I am saying.) Say you wanted an object to jump. Instead of writing the jump code in the main method, you could write it in its own method, and then drop that method into the main method. I hope this helps! Let me know if you have any other questions!