-
Notifications
You must be signed in to change notification settings - Fork 2
/
AccelerateWindowOpenness.js
51 lines (45 loc) · 1.47 KB
/
AccelerateWindowOpenness.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//=============================================================================
// AccelerateWindowOpenness.js
//=============================================================================
/*:
* @plugindesc Accelerates/decelerates all animations opening/closing a window.
* @author Toru Higuruma
*
* @help AccelerateWindowOpenness v1.0 (2019-03-18)
* Copyright (c) 2019 Toru Higuruma
* This plugin is provided under the MIT License.
* https://git.io/tmv
*
* Plugin commands:
* This plugin does not provide plugin commands.
*/
/*:ja
* @plugindesc すべてのウィンドウの開閉アニメーションを加減速させます。
* @author Toru Higuruma
*
* @help AccelerateWindowOpenness v1.0 (2019-03-18)
* Copyright (c) 2019 Toru Higuruma
* このプラグインは MIT License の下で提供されます。
* https://git.io/tmv
*
* プラグインコマンド:
* このプラグインにプラグインコマンドはありません。
*/
(function() {
Window_Base.prototype.updateOpen = function() {
if (this._opening) {
this.openness += Math.floor((281 - this.openness) / 3);
if (this.isOpen()) {
this._opening = false;
}
}
};
Window_Base.prototype.updateClose = function() {
if (this._closing) {
this.openness -= Math.floor((281 - this.openness) / 2);
if (this.isClosed()) {
this._closing = false;
}
}
};
})();