So we downloaded one of Prime 31's plugins, and at first I thought "man, I totally would have done this differently"-- until I realized that he was doing something better than what I would have done. I noticed he uses delegates and events, and it appears as though you can just add a function to an event. Are the addition and subtraction operators overloaded to mean "AddEventListener" and "RemoveEventListener" for the event class? Also, while I understand what a delegate is and to some degree how they work, I've never seen that delegate keyword in front of a function in the languages I've worked in. Does anyone mind explaining how it works?
How? I was under the impression that events were not usable in "JavaScript". You'd be wise to check out Prime31's videos, especially if you're using the plugins. http://www.youtube.com/watch?v=N2zdwKIsXJs
I'm unsure if you can define an event in JavaScript, but if one's defined in a C# script then it's usable no problem.