View Single Post
  #4  
Old 04-15-2007, 02:08 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Novo View Post
It's a tree communicator. Basically...

There is a parent object, and child objects. You can attach an object to the parent object... When you trigger an event to the parent object, it sends it out to all children objects.

For instance...

If you have a house ( parent object ) and you have furniture in ( children objects ). Sadly, the house burns down, and everything in it. ( Event ). One way of doing this is house.trigger( "Event", "burnDown", 4 );
So every object in the house gets a object.onEventburnDown( 4 ); called.
Okay, I didn't quite understand it.

Nice, fancy code! Good work, keep it up

Thanks for contributing, I'll sure use this.
__________________
Reply With Quote