Inheritance: ScriptObject
Ejemplo n.º 1
0
 public ScriptBoolean False { get { return m_False; } }                  //false对象
 public Script() {
     m_Null = new ScriptNull(this);
     m_True = new ScriptBoolean(this, true);
     m_False = new ScriptBoolean(this, false);
     m_GlobalTable = CreateTable();
     m_GlobalTable.SetValue(GLOBAL_TABLE, m_GlobalTable);
     m_GlobalTable.SetValue(GLOBAL_VERSION, CreateString(Version));
     m_GlobalTable.SetValue(GLOBAL_SCRIPT, CreateObject(this));
     PushAssembly(typeof(object).GetTypeInfo().Assembly);                        //mscorlib.dll
     PushAssembly(typeof(System.Net.Sockets.Socket).GetTypeInfo().Assembly);     //System.dll
     PushAssembly(GetType().GetTypeInfo().Assembly);                             //当前所在的程序集
 }
Ejemplo n.º 2
0
 }                                                                       //false对象
 public Script()
 {
     m_Null        = new ScriptNull(this);
     m_True        = new ScriptBoolean(this, true);
     m_False       = new ScriptBoolean(this, false);
     m_GlobalTable = CreateTable();
     m_GlobalTable.SetValue(GLOBAL_TABLE, m_GlobalTable);
     m_GlobalTable.SetValue(GLOBAL_VERSION, CreateString(Version));
     m_GlobalTable.SetValue(GLOBAL_SCRIPT, CreateObject(this));
     PushAssembly(typeof(object).GetTypeInfo().Assembly);                        //mscorlib.dll
     PushAssembly(typeof(System.Net.Sockets.Socket).GetTypeInfo().Assembly);     //System.dll
     PushAssembly(GetType().GetTypeInfo().Assembly);                             //当前所在的程序集
 }
Ejemplo n.º 3
0
 public Script()
 {
     this.m_Null        = new ScriptNull(this);
     this.m_True        = new ScriptBoolean(this, true);
     this.m_False       = new ScriptBoolean(this, false);
     this.m_GlobalTable = this.CreateTable();
     this.m_GlobalTable.SetValue("_G", this.m_GlobalTable);
     this.m_GlobalTable.SetValue("_VERSION", this.CreateString("master"));
     this.m_GlobalTable.SetValue("_SCRIPT", this.CreateObject(this));
     this.PushAssembly(typeof(object).GetTypeInfo().Assembly);
     this.PushAssembly(typeof(Socket).GetTypeInfo().Assembly);
     this.PushAssembly(base.GetType().GetTypeInfo().Assembly);
 }
Ejemplo n.º 4
0
 public Script()
 {
     Null              = new ScriptNull(this);
     True              = new ScriptBoolean(this, true);
     False             = new ScriptBoolean(this, false);
     m_UserdataFactory = new DefaultScriptUserdataFactory(this);
     m_GlobalTable     = CreateTable();
     m_GlobalTable.SetValue(GLOBAL_TABLE, m_GlobalTable);
     m_GlobalTable.SetValue(GLOBAL_VERSION, CreateString(Version));
     m_GlobalTable.SetValue(GLOBAL_SCRIPT, CreateObject(this));
     PushAssembly(ScriptExtensions.GetAssembly(typeof(object)));
     PushAssembly(ScriptExtensions.GetAssembly(GetType()));
 }
Ejemplo n.º 5
0
        private IScriptUserdataFactory m_UserdataFactory = null; //Userdata工厂

        #endregion Fields

        #region Constructors

        public Script()
        {
            Null = new ScriptNull(this);
            True = new ScriptBoolean(this, true);
            False = new ScriptBoolean(this, false);
            m_UserdataFactory = new DefaultScriptUserdataFactory(this);
            m_GlobalTable = CreateTable();
            m_GlobalTable.SetValue(GLOBAL_TABLE, m_GlobalTable);
            m_GlobalTable.SetValue(GLOBAL_VERSION, CreateString(Version));
            m_GlobalTable.SetValue(GLOBAL_SCRIPT, CreateObject(this));
            #if !SCORPIO_UWP
            PushAssembly(typeof(object).Assembly);
            PushAssembly(GetType().Assembly);
            #endif
        }