Classes and Subs in SP?
-
I was just making a web browser in MS VB.NET and i noticed how easy it was to program the code because of the classes and subs which define events and other things. Could this be possible in SP? I know it will be a lot of work but it should work, right?
-
What, in ontick/touch? Already possible, with ruby classes and methods. E.g. my AI is based around my CarAI class, and you actually access scripting in SP from inside the ControllerContext class, which includes the special methods like get/setVar, lookAt, oscillator etc. This tut shows you how to make classes in ruby:
http://www.devarticles.com/c/a/Ruby-on-Rails/Ruby-Classes-and-Objects/1/ -
Yeah. Think of each object in the simulation as a class and the onTick, onTouch, etc are the event "subs".
Advertisement