加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 LBQ 于 2015-10-3 01:36 编辑
比如说我们写了个插件(这个插件本身没有任何意义)
var Scene_Crafting, Window_CanCraftItems, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; Window_CanCraftItems = (function(superClass) { extend(Window_CanCraftItems, superClass); function Window_CanCraftItems() { return Window_CanCraftItems.__super__.constructor.apply(this, arguments); } Window_CanCraftItems.prototype.initialize = function() { return Window_CanCraftItems.__super__.initialize.call(this); }; return Window_CanCraftItems; })(Window_ItemList); Scene_Crafting = (function(superClass) { extend(Scene_Crafting, superClass); function Scene_Crafting() { return Scene_Crafting.__super__.constructor.apply(this, arguments); } Scene_Crafting.prototype.initialize = function() { return Scene_Crafting.__super__.initialize.call(this); }; Scene_Crafting.prototype.create = function() { Scene_Crafting.__super__.create.call(this); this.createBackground(); this.createWindowLayer(); this.createGoldWindow(); this.createLeftWindow(); return this.createRightWindow(); }; Scene_Crafting.prototype.start = function() { return Scene_Crafting.__super__.start.call(this); }; Scene_Crafting.prototype.createGoldWindow = function() { this.goldWindow = new Window_Gold(0, 0); return this.addWindow(this.goldWindow); }; Scene_Crafting.prototype.createLeftWindow = function() { this.leftWindow = new Window_ItemList(0, this.goldWindow.height, Graphics.width / 2, Graphics.height - this.goldWindow.height); return this.addWindow(this.leftWindow); }; Scene_Crafting.prototype.createRightWindow = function() { return this.rightWindow = new Window_ItemList(Graphics.width / 2, this.goldWindow.height, Graphics.width / 2, Graphics.height - this.goldWindow.height); }; return Scene_Crafting; })(Scene_MenuBase); window.Scene_Crafting = Scene_Crafting;
var Scene_Crafting, Window_CanCraftItems,
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
Window_CanCraftItems = (function(superClass) {
extend(Window_CanCraftItems, superClass);
function Window_CanCraftItems() {
return Window_CanCraftItems.__super__.constructor.apply(this, arguments);
}
Window_CanCraftItems.prototype.initialize = function() {
return Window_CanCraftItems.__super__.initialize.call(this);
};
return Window_CanCraftItems;
})(Window_ItemList);
Scene_Crafting = (function(superClass) {
extend(Scene_Crafting, superClass);
function Scene_Crafting() {
return Scene_Crafting.__super__.constructor.apply(this, arguments);
}
Scene_Crafting.prototype.initialize = function() {
return Scene_Crafting.__super__.initialize.call(this);
};
Scene_Crafting.prototype.create = function() {
Scene_Crafting.__super__.create.call(this);
this.createBackground();
this.createWindowLayer();
this.createGoldWindow();
this.createLeftWindow();
return this.createRightWindow();
};
Scene_Crafting.prototype.start = function() {
return Scene_Crafting.__super__.start.call(this);
};
Scene_Crafting.prototype.createGoldWindow = function() {
this.goldWindow = new Window_Gold(0, 0);
return this.addWindow(this.goldWindow);
};
Scene_Crafting.prototype.createLeftWindow = function() {
this.leftWindow = new Window_ItemList(0, this.goldWindow.height, Graphics.width / 2, Graphics.height - this.goldWindow.height);
return this.addWindow(this.leftWindow);
};
Scene_Crafting.prototype.createRightWindow = function() {
return this.rightWindow = new Window_ItemList(Graphics.width / 2, this.goldWindow.height, Graphics.width / 2, Graphics.height - this.goldWindow.height);
};
return Scene_Crafting;
})(Scene_MenuBase);
window.Scene_Crafting = Scene_Crafting;
我们把它挂在refheap上:https://www.refheap.com/110212/raw
然后安装这个包管理器:
$ npm install -g skyscrap
$ npm install -g skyscrap
然后在MV工程的文件夹
其实这个管理器很通用(很懒),假如能普及就好了 |