Exemplo n.º 1
0
        public static MondValue Create(RequireLibrary require)
        {
            MondValue prototype;
            MondClassBinder.Bind<RequireClass>(out prototype);

            var instance = new RequireClass();
            instance._require = require;

            var obj = new MondValue(MondValueType.Object);
            obj.UserData = instance;
            obj.Prototype = prototype;
            obj.Lock();

            return obj;
        }
Exemplo n.º 2
0
        public static MondValue Create(MondState state, RequireLibrary require)
        {
            MondClassBinder.Bind <RequireClass>(state, out var prototype);

            var instance = new RequireClass();

            instance._require = require;

            var obj = new MondValue(MondValueType.Object);

            obj.UserData  = instance;
            obj.Prototype = prototype;
            obj.Lock();

            return(obj);
        }