Quote:
Originally Posted by timsally
I have a question that will probably seem elementary, but I am a just beginning to learn the rules of programming.
I'm creating a world with three objects -- a frog, a bunny, and a hampster -- and they are interacting with each other.
My question relates to creating a new method that involves a single action by two of the objects, as seen here:
frog.head point at bunny.upperBody.head duration 0.5 seconds
hampster.head point at bunny.upperBody.head duration 0.5 seconds
Is creating new methods reserved for multiple actions of ONE object, or am I alright with combining the actions above for two objects into a method since they repeat?
Thanks,
Tim S.
|
Adding on to Arty, you can do multiple actions in any statement holder. Do together is good for that. You can do it with events. But its better to stick to Methods. You can make a method inside a method to. In the end. They all do the same thing and everyones happy!