-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Scene_GameEnd.js
42 lines (34 loc) · 1.25 KB
/
Scene_GameEnd.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
//-----------------------------------------------------------------------------
// Scene_GameEnd
//
// The scene class of the game end screen.
function Scene_GameEnd() {
this.initialize.apply(this, arguments);
}
Scene_GameEnd.prototype = Object.create(Scene_MenuBase.prototype);
Scene_GameEnd.prototype.constructor = Scene_GameEnd;
Scene_GameEnd.prototype.initialize = function() {
Scene_MenuBase.prototype.initialize.call(this);
};
Scene_GameEnd.prototype.create = function() {
Scene_MenuBase.prototype.create.call(this);
this.createCommandWindow();
};
Scene_GameEnd.prototype.stop = function() {
Scene_MenuBase.prototype.stop.call(this);
this._commandWindow.close();
};
Scene_GameEnd.prototype.createBackground = function() {
Scene_MenuBase.prototype.createBackground.call(this);
this.setBackgroundOpacity(128);
};
Scene_GameEnd.prototype.createCommandWindow = function() {
this._commandWindow = new Window_GameEnd();
this._commandWindow.setHandler('toTitle', this.commandToTitle.bind(this));
this._commandWindow.setHandler('cancel', this.popScene.bind(this));
this.addWindow(this._commandWindow);
};
Scene_GameEnd.prototype.commandToTitle = function() {
this.fadeOutAll();
SceneManager.goto(Scene_Title);
};