コード例 #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;
        }
コード例 #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);
        }