-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Scene_MenuBase.js
60 lines (48 loc) · 1.58 KB
/
Scene_MenuBase.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
52
53
54
55
56
57
58
59
60
//-----------------------------------------------------------------------------
// Scene_MenuBase
//
// The superclass of all the menu-type scenes.
function Scene_MenuBase() {
this.initialize.apply(this, arguments);
}
Scene_MenuBase.prototype = Object.create(Scene_Base.prototype);
Scene_MenuBase.prototype.constructor = Scene_MenuBase;
Scene_MenuBase.prototype.initialize = function() {
Scene_Base.prototype.initialize.call(this);
};
Scene_MenuBase.prototype.create = function() {
Scene_Base.prototype.create.call(this);
this.createBackground();
this.updateActor();
this.createWindowLayer();
};
Scene_MenuBase.prototype.actor = function() {
return this._actor;
};
Scene_MenuBase.prototype.updateActor = function() {
this._actor = $gameParty.menuActor();
};
Scene_MenuBase.prototype.createBackground = function() {
this._backgroundSprite = new Sprite();
this._backgroundSprite.bitmap = SceneManager.backgroundBitmap();
this.addChild(this._backgroundSprite);
};
Scene_MenuBase.prototype.setBackgroundOpacity = function(opacity) {
this._backgroundSprite.opacity = opacity;
};
Scene_MenuBase.prototype.createHelpWindow = function() {
this._helpWindow = new Window_Help();
this.addWindow(this._helpWindow);
};
Scene_MenuBase.prototype.nextActor = function() {
$gameParty.makeMenuActorNext();
this.updateActor();
this.onActorChange();
};
Scene_MenuBase.prototype.previousActor = function() {
$gameParty.makeMenuActorPrevious();
this.updateActor();
this.onActorChange();
};
Scene_MenuBase.prototype.onActorChange = function() {
};