Advertisement
snake5

Object-oriented SGScript

Jan 19th, 2013
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var myInfoIface =
  2. {
  3.     greetMe = function( this )
  4.     {
  5.         print( "Hello, " $ this._name $ "!\n" );
  6.     },
  7.     setMyName = function( this, name )
  8.     {
  9.         this._name = name;
  10.     },
  11. };
  12. myInfo = class( {}, myInfoIface );
  13. print( "Created a ", myInfo, " object with this interface: ", myInfo._super, "\n" );
  14. myInfo.setMyName( "SGScript" );
  15. myInfo.greetMe();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement