Add special ending
This commit is contained in:
parent
e4654b18c3
commit
df28a675c0
5 changed files with 401 additions and 4 deletions
BIN
assets/cutscene/ending.png
Normal file
BIN
assets/cutscene/ending.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 32 KiB |
|
@ -3456,7 +3456,23 @@ LevelDatabase["Intro"] = {
|
|||
"z": 32
|
||||
},
|
||||
"destination": {"stage": "Save 1","axis": 0,"position": 867,"z": 270,"momx":2,"momy":0}
|
||||
}
|
||||
},
|
||||
{
|
||||
"position": {
|
||||
"x": 11744,
|
||||
"y": 6872.439701602464,
|
||||
"z": 170.01030354552438
|
||||
},
|
||||
"bbox": {
|
||||
"x": 32,
|
||||
"y": 32,
|
||||
"z": 32
|
||||
},
|
||||
"destination": {
|
||||
"stage": "Save 5",
|
||||
"axis": 0,"position": 1501,"z": 270,"momx":-2,"momy":0
|
||||
}
|
||||
}
|
||||
],
|
||||
"spawn": {
|
||||
"axis": 0,
|
||||
|
@ -23452,8 +23468,7 @@ axes: [{x: 0, y: 0, radius: -352, angle: 0, length: 360, left: [0], right: [0]}]
|
|||
boss: 1,
|
||||
rocks: [], keys: [], doors: [], transitions: [], spawn: {axis: 0, position: 1, z: 0}};
|
||||
|
||||
LevelDatabase["Ending"] =
|
||||
{
|
||||
LevelDatabase["Ending"] = {
|
||||
"background": {
|
||||
"image": "boss",
|
||||
"width": 3072
|
||||
|
@ -23922,5 +23937,347 @@ LevelDatabase["Ending"] =
|
|||
}
|
||||
};
|
||||
|
||||
LevelDatabase["Save 5"] = {
|
||||
"tint": {
|
||||
"rgb": 12272810,
|
||||
"a": 0.6,
|
||||
"effect": "MULTIPLY"
|
||||
},
|
||||
"music": "ocean",
|
||||
"save": true,
|
||||
"background": {
|
||||
"image": "save",
|
||||
"width": 3072
|
||||
},
|
||||
"axes": [
|
||||
{
|
||||
"x": 1000,
|
||||
"y": 1000,
|
||||
"radius": -512,
|
||||
"angle": 0,
|
||||
"length": 360,
|
||||
"left": [
|
||||
0
|
||||
],
|
||||
"right": [
|
||||
0
|
||||
]
|
||||
}
|
||||
],
|
||||
"rocks": [
|
||||
{
|
||||
"x": 1134,
|
||||
"y": 1494,
|
||||
"z": -1054,
|
||||
"type": "large"
|
||||
},
|
||||
{
|
||||
"x": 1134,
|
||||
"y": 1494,
|
||||
"z": -875,
|
||||
"type": "large"
|
||||
},
|
||||
{
|
||||
"x": 1134,
|
||||
"y": 1494,
|
||||
"z": -696,
|
||||
"type": "large"
|
||||
},
|
||||
{
|
||||
"x": 1134,
|
||||
"y": 1494,
|
||||
"z": -517,
|
||||
"type": "large"
|
||||
},
|
||||
{
|
||||
"x": 1134,
|
||||
"y": 1494,
|
||||
"z": -322,
|
||||
"type": "large"
|
||||
},
|
||||
{
|
||||
"x": 1134,
|
||||
"y": 1494,
|
||||
"z": -141,
|
||||
"type": "large"
|
||||
},
|
||||
{
|
||||
"x": 1134,
|
||||
"y": 1494,
|
||||
"z": 17,
|
||||
"type": "large"
|
||||
},
|
||||
{
|
||||
"x": 1134,
|
||||
"y": 1494,
|
||||
"z": 189,
|
||||
"type": "large"
|
||||
},
|
||||
{
|
||||
"x": 1107,
|
||||
"y": 1501,
|
||||
"z": 96,
|
||||
"type": "large"
|
||||
},
|
||||
{
|
||||
"x": 1107,
|
||||
"y": 1501,
|
||||
"z": -69,
|
||||
"type": "large"
|
||||
},
|
||||
{
|
||||
"x": 1107,
|
||||
"y": 1501,
|
||||
"z": -231,
|
||||
"type": "large"
|
||||
},
|
||||
{
|
||||
"x": 1107,
|
||||
"y": 1501,
|
||||
"z": -405,
|
||||
"type": "large"
|
||||
},
|
||||
{
|
||||
"x": 1107,
|
||||
"y": 1501,
|
||||
"z": -600,
|
||||
"type": "large"
|
||||
},
|
||||
{
|
||||
"x": 1107,
|
||||
"y": 1501,
|
||||
"z": -793,
|
||||
"type": "large"
|
||||
},
|
||||
{
|
||||
"x": 1107,
|
||||
"y": 1501,
|
||||
"z": -959,
|
||||
"type": "large"
|
||||
},
|
||||
{
|
||||
"x": 1482,
|
||||
"y": 1173,
|
||||
"z": 202,
|
||||
"type": "large"
|
||||
},
|
||||
{
|
||||
"x": 1482,
|
||||
"y": 1173,
|
||||
"z": 21,
|
||||
"type": "large"
|
||||
},
|
||||
{
|
||||
"x": 1482,
|
||||
"y": 1173,
|
||||
"z": -123,
|
||||
"type": "large"
|
||||
},
|
||||
{
|
||||
"x": 1482,
|
||||
"y": 1173,
|
||||
"z": -304,
|
||||
"type": "large"
|
||||
},
|
||||
{
|
||||
"x": 1482,
|
||||
"y": 1173,
|
||||
"z": -478,
|
||||
"type": "large"
|
||||
},
|
||||
{
|
||||
"x": 1482,
|
||||
"y": 1173,
|
||||
"z": -644,
|
||||
"type": "large"
|
||||
},
|
||||
{
|
||||
"x": 1482,
|
||||
"y": 1173,
|
||||
"z": -823,
|
||||
"type": "large"
|
||||
},
|
||||
{
|
||||
"x": 1482,
|
||||
"y": 1173,
|
||||
"z": -975,
|
||||
"type": "large"
|
||||
},
|
||||
{
|
||||
"x": 1482,
|
||||
"y": 1173,
|
||||
"z": -1159,
|
||||
"type": "large"
|
||||
},
|
||||
{
|
||||
"x": 1491,
|
||||
"y": 1146,
|
||||
"z": -1072,
|
||||
"type": "large"
|
||||
},
|
||||
{
|
||||
"x": 1491,
|
||||
"y": 1146,
|
||||
"z": -905,
|
||||
"type": "large"
|
||||
},
|
||||
{
|
||||
"x": 1491,
|
||||
"y": 1146,
|
||||
"z": -725,
|
||||
"type": "large"
|
||||
},
|
||||
{
|
||||
"x": 1491,
|
||||
"y": 1146,
|
||||
"z": -551,
|
||||
"type": "large"
|
||||
},
|
||||
{
|
||||
"x": 1491,
|
||||
"y": 1146,
|
||||
"z": -382,
|
||||
"type": "large"
|
||||
},
|
||||
{
|
||||
"x": 1491,
|
||||
"y": 1146,
|
||||
"z": -209,
|
||||
"type": "large"
|
||||
},
|
||||
{
|
||||
"x": 1491,
|
||||
"y": 1146,
|
||||
"z": -51,
|
||||
"type": "large"
|
||||
},
|
||||
{
|
||||
"x": 1491,
|
||||
"y": 1146,
|
||||
"z": 113,
|
||||
"type": "large"
|
||||
},
|
||||
{
|
||||
"x": 1502,
|
||||
"y": 1102,
|
||||
"z": 238,
|
||||
"type": "wide"
|
||||
},
|
||||
{
|
||||
"x": 1512,
|
||||
"y": 994,
|
||||
"z": 238,
|
||||
"type": "wide"
|
||||
},
|
||||
{
|
||||
"x": 1501,
|
||||
"y": 895,
|
||||
"z": 238,
|
||||
"type": "wide"
|
||||
},
|
||||
{
|
||||
"x": 1470,
|
||||
"y": 797,
|
||||
"z": 238,
|
||||
"type": "wide"
|
||||
},
|
||||
{
|
||||
"x": 1141,
|
||||
"y": 1492,
|
||||
"z": 308,
|
||||
"type": "wide"
|
||||
},
|
||||
{
|
||||
"x": 1234,
|
||||
"y": 1455,
|
||||
"z": 308,
|
||||
"type": "wide"
|
||||
},
|
||||
{
|
||||
"x": 1316,
|
||||
"y": 1403,
|
||||
"z": 308,
|
||||
"type": "wide"
|
||||
},
|
||||
{
|
||||
"x": 1386,
|
||||
"y": 1337,
|
||||
"z": 308,
|
||||
"type": "wide"
|
||||
},
|
||||
{
|
||||
"x": 1443,
|
||||
"y": 1257,
|
||||
"z": 308,
|
||||
"type": "wide"
|
||||
},
|
||||
{
|
||||
"x": 1482,
|
||||
"y": 1172,
|
||||
"z": 308,
|
||||
"type": "wide"
|
||||
},
|
||||
{
|
||||
"x": 1508,
|
||||
"y": 1068,
|
||||
"z": 308,
|
||||
"type": "wide"
|
||||
},
|
||||
{
|
||||
"x": 1511,
|
||||
"y": 966,
|
||||
"z": 308,
|
||||
"type": "wide"
|
||||
},
|
||||
{
|
||||
"x": 1495,
|
||||
"y": 870,
|
||||
"z": 308,
|
||||
"type": "wide"
|
||||
},
|
||||
{
|
||||
"x": 1454,
|
||||
"y": 763,
|
||||
"z": 308,
|
||||
"type": "wide"
|
||||
},
|
||||
{
|
||||
"x": 1108,
|
||||
"y": 1500,
|
||||
"z": 268,
|
||||
"type": "medium"
|
||||
}
|
||||
],
|
||||
"keys": [],
|
||||
"doors": [],
|
||||
"transitions": [
|
||||
{
|
||||
"position": {
|
||||
"x": 1509.8455531874472,
|
||||
"y": 1046.9202716849118,
|
||||
"z": 270
|
||||
},
|
||||
"bbox": {
|
||||
"x": 32,
|
||||
"y": 32,
|
||||
"z": 32
|
||||
},
|
||||
"destination": {
|
||||
"stage": "Intro",
|
||||
"axis": 0,
|
||||
"position": 4908,
|
||||
"z": 178,
|
||||
"momx": 2,
|
||||
"momy": 0
|
||||
}
|
||||
}
|
||||
],
|
||||
"spawn": {
|
||||
"axis": 0,
|
||||
"position": 622,
|
||||
"z": 257
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
//
|
|
@ -59,4 +59,16 @@ RescueDatabase["Post"] = {
|
|||
"These doors are said to be the keys to life.",
|
||||
"What could they mean by that?",
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
RescueDatabase["Save 5"] = {
|
||||
sprite: "gf",
|
||||
position: {
|
||||
"x": 1358,
|
||||
"y": 1365,
|
||||
"z": 149 },
|
||||
lines: [
|
||||
".....",
|
||||
"I'll never leave.",
|
||||
]
|
||||
};
|
||||
|
|
|
@ -256,6 +256,11 @@ Level = function(levelName) {
|
|||
Memory.save();
|
||||
SFX.play("save");
|
||||
|
||||
// Special ending.
|
||||
if (levelName == "Save 5") {
|
||||
Game.setScene(Ending());
|
||||
}
|
||||
|
||||
var text = Renderer.text("Your adventure has been saved.", 140, 200)
|
||||
level.stage.addChild(text);
|
||||
|
||||
|
|
23
other/Ending.js
Normal file
23
other/Ending.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
Ending = function() {
|
||||
var ending = Scene();
|
||||
|
||||
var fade;
|
||||
|
||||
ending.init = function() {
|
||||
ending.stage.addChild(PIXI.Sprite.fromImage("assets/cutscene/ending.png"));
|
||||
ending.stage.addChild(Renderer.text("Your adventure is now over.", 250, 220));
|
||||
fade = new PIXI.Graphics();
|
||||
fade.beginFill(0xFFFFFF);
|
||||
fade.drawRect(0, 0, 500, 280);
|
||||
fade.endFill();
|
||||
ending.stage.addChild(fade);
|
||||
|
||||
Music.fadeout(3000);
|
||||
}
|
||||
|
||||
ending.think = function() {
|
||||
fade.alpha -= 0.005;
|
||||
}
|
||||
|
||||
return ending;
|
||||
};
|
Loading…
Add table
Reference in a new issue