Scene_Battle.prototype.createDisplayObjects = function() { this.createSpriteset(); this.createWindowLayer(); this.createAllWindows(); BattleManager.setLogWindow(this._logWindow); BattleManager.setSpriteset(this._spriteset); this._logWindow.setSpriteset(this._spriteset); }; Scene_Battle.prototype.createAllWindows = function() { this.createLogWindow(); this.createActorCommandWindow(); this.createHelpWindow(); this.createSkillWindow(); this.createItemWindow(); this.createActorWindow(); this.createEnemyWindow(); this.createMessageWindow(); }; Scene_Battle.prototype.isAnyInputWindowActive = function() { return (this._actorCommandWindow.active || this._skillWindow.active || this._itemWindow.active || this._actorWindow.active || this._enemyWindow.active); }; Scene_Battle.prototype.changeInputWindow = function() { if (BattleManager.isInputting()) { if (BattleManager.actor()) { this.startActorCommandSelection(); } } else { this.endCommandSelection(); } }; Scene_Battle.prototype.endCommandSelection = function() { this._actorCommandWindow.close(); }; Scene_Battle.prototype.startActorCommandSelection = function() { this._actorCommandWindow.setup(BattleManager.actor()); }; Scene_Battle.prototype.createSkillWindow = function() { var wy = this._helpWindow.y + this._helpWindow.height; var wh = 0; this._skillWindow = new Window_BattleSkill(0, wy, Graphics.boxWidth, wh); this._skillWindow.setHelpWindow(this._helpWindow); this._skillWindow.setHandler('ok', this.onSkillOk.bind(this)); this._skillWindow.setHandler('cancel', this.onSkillCancel.bind(this)); this.addWindow(this._skillWindow); }; Scene_Battle.prototype.createItemWindow = function() { var wy = this._helpWindow.y + this._helpWindow.height; var wh = 0; this._itemWindow = new Window_BattleItem(0, wy, Graphics.boxWidth, wh); this._itemWindow.setHelpWindow(this._helpWindow); this._itemWindow.setHandler('ok', this.onItemOk.bind(this)); this._itemWindow.setHandler('cancel', this.onItemCancel.bind(this)); this.addWindow(this._itemWindow); }; Scene_Battle.prototype.createActorWindow = function() { this._actorWindow = new Window_BattleActor(0, 0); this._actorWindow.setHandler('ok', this.onActorOk.bind(this)); this._actorWindow.setHandler('cancel', this.onActorCancel.bind(this)); this.addWindow(this._actorWindow); }; Scene_Battle.prototype.createEnemyWindow = function() { this._enemyWindow = new Window_BattleEnemy(0, 0); this._enemyWindow.x = Graphics.boxWidth - this._enemyWindow.width; this._enemyWindow.setHandler('ok', this.onEnemyOk.bind(this)); this._enemyWindow.setHandler('cancel', this.onEnemyCancel.bind(this)); this.addWindow(this._enemyWindow); }; Scene_Battle.prototype.updateWindowPositions = function() { }; Scene_Battle.prototype.updateStatusWindow = function() { if ($gameMessage.isBusy()) { this._actorCommandWindow.close(); } }; BattleManager.setStatusWindow = function(statusWindow) { }; BattleManager.refreshStatus = function() { };
Window_Base.prototype.update = function() { if ($gameParty.inBattle() && !this.visible) return; Window.prototype.update.call(this); this.updateTone(); this.updateOpen(); this.updateClose(); this.updateBackgroundDimmer(); };
SceneManager.initInput = function() { Input.initialize(); }; SceneManager.updateInputData = function() { Input.update(); }; Game_Player.prototype.triggerTouchActionD1 = function(x1, y1) { if ($gameMap.airship().pos(x1, y1)) { if (this.getOnOffVehicle()) { return true; } } this.checkEventTriggerHere([0]); return $gameMap.setupStartingEvent(); }; Game_Player.prototype.triggerTouchActionD2 = function(x2, y2) { if ($gameMap.boat().pos(x2, y2) || $gameMap.ship().pos(x2, y2)) { if (this.getOnVehicle()) { return true; } } if (this.isInBoat() || this.isInShip()) { if (this.getOffVehicle()) { return true; } } this.checkEventTriggerThere([0,1,2]); return $gameMap.setupStartingEvent(); }; Scene_Map.prototype.isFastForward = function() { return ($gameMap.isEventRunning() && !SceneManager.isSceneChanging() && Input.isLongPressed('ok')); }; Scene_Map.prototype.isMenuCalled = function() { return Input.isTriggered('menu'); }; Scene_Gameover.prototype.isTriggered = function() { return Input.isTriggered('ok'); }; Scene_Map.prototype.updateDestination = function() { $gameTemp.clearDestination(); this._touchCount = 0; }; Window_Selectable.prototype.update = function() { Window_Base.prototype.update.call(this); this.updateArrows(); this.processCursorMove(); this.processHandling(); this._stayCount++; }; Window_ShopStatus.prototype.isPageChangeRequested = function() { if (Input.isTriggered('shift')) { return true; } return false; }; Window_Message.prototype.isTriggered = function() { return (Input.isRepeated('ok') || Input.isRepeated('cancel')); }; Window_ScrollText.prototype.isFastForward = function() { if ($gameMessage.scrollNoFast()) { return false; } else { return (Input.isPressed('ok') || Input.isPressed('shift')); } }; Window_BattleLog.prototype.isFastForward = function() { return (Input.isLongPressed('ok') || Input.isPressed('shift')); }; Window_Selectable.prototype.updateInputData = function() { Input.update(); };
Window_NumberInput.prototype.initialize = function(messageWindow) { this._messageWindow = messageWindow; Window_Selectable.prototype.initialize.call(this, 0, 0, 0, 0); this._number = 0; this._maxDigits = 1; this.openness = 0; this.deactivate(); }; Window_ShopNumber.prototype.initialize = function(x, y, height) { var width = this.windowWidth(); Window_Selectable.prototype.initialize.call(this, x, y, width, height); this._item = null; this._max = 1; this._price = 0; this._number = 1; this._currencyUnit = TextManager.currencyUnit; }; Window_ShopNumber.prototype.setup = function(item, max, price) { this._item = item; this._max = Math.floor(max); this._price = price; this._number = 1; this.refresh(); }; Window_NumberInput.prototype.start = function() { this._maxDigits = $gameMessage.numInputMaxDigits(); this._number = $gameVariables.value($gameMessage.numInputVariableId()); this._number = this._number.clamp(0, Math.pow(10, this._maxDigits) - 1); this.updatePlacement(); this.createContents(); this.refresh(); this.open(); this.activate(); this.select(0); };
Scene_Map.prototype.createDisplayObjects = function() { this.createSpriteset(); this.createWindowLayer(); this.createAllWindows(); }; Scene_Map.prototype.callMenu = function() { SoundManager.playOk(); SceneManager.push(Scene_Menu); Window_MenuCommand.initCommandPosition(); $gameTemp.clearDestination(); this._waitCount = 2; }; Scene_Map.prototype.launchBattle = function() { BattleManager.saveBgmAndBgs(); this.stopAudioOnBattleStart(); SoundManager.playBattleStart(); this.startEncounterEffect(); }; Scene_Map.prototype.start = function() { Scene_Base.prototype.start.call(this); SceneManager.clearStack(); if (this._transfer) { this.fadeInForTransfer(); $gameMap.autoplay(); } else if (this.needsFadeIn()) { this.startFadeIn(this.fadeSpeed(), false); } this.menuCalling = false; }; Scene_Map.prototype.terminate = function() { Scene_Base.prototype.terminate.call(this); if (!SceneManager.isNextScene(Scene_Battle)) { this._spriteset.update(); SceneManager.snapForBackground(); } else { ImageManager.clearRequest(); } if (SceneManager.isNextScene(Scene_Map)) { ImageManager.clearRequest(); } $gameScreen.clearZoom(); this.removeChild(this._fadeSprite); this.removeChild(this._windowLayer); this.removeChild(this._spriteset); };
doranikofu 发表于 2017-8-4 14:35
window base那个感觉不错 回头试试去
这有人也做过一个优化,具体不太懂,也不知道效果有多好
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |