Rebuild Princess Lima maps around the new visual atlas
All checks were successful
Build Org Website / build (push) Successful in 38s
All checks were successful
Build Org Website / build (push) Successful in 38s
This commit is contained in:
@@ -13,7 +13,6 @@
|
||||
preload() {
|
||||
this.load.image("lima-title", "/assets/images/play/princess-lima/title-landscape.png");
|
||||
this.load.spritesheet("lima-cast", "/assets/images/play/princess-lima/cast-atlas.png", { frameWidth: 314, frameHeight: 314 });
|
||||
this.load.spritesheet("lima-world-tiles", "/assets/images/play/princess-lima/world-tiles.png", { frameWidth: 32, frameHeight: 32 });
|
||||
this.load.spritesheet("lima-region-atlas", "/assets/images/play/princess-lima/regional-style-atlas.png", { frameWidth: 418, frameHeight: 418 });
|
||||
const audio = "/assets/audio/princess-lima/";
|
||||
[
|
||||
@@ -25,7 +24,7 @@
|
||||
}
|
||||
|
||||
create() {
|
||||
this.add.image(500, Data.HEIGHT / 2, "lima-title").setDisplaySize(1000, Data.HEIGHT);
|
||||
this.add.image(Data.WIDTH / 2, Data.HEIGHT / 2, "lima-title").setDisplaySize(Data.WIDTH, Data.HEIGHT);
|
||||
controller.audio.attach(this, "village");
|
||||
controller.ready();
|
||||
}
|
||||
@@ -93,7 +92,7 @@
|
||||
|
||||
drawMap() {
|
||||
this.cameras.main.setBackgroundColor(this.map.palette[0]);
|
||||
Maps.render(this, this.regionId, this.map.obstacles, this.map.dynamicObstacles, controller.getState().unlockedRoutes);
|
||||
Maps.render(this, this.regionId);
|
||||
}
|
||||
|
||||
addSolid(shape) {
|
||||
@@ -173,8 +172,7 @@
|
||||
|
||||
createExits() {
|
||||
(this.map.exits || []).forEach((item) => {
|
||||
const zone = this.add.rectangle(item.x + item.width / 2, item.y + item.height / 2, item.width, item.height, 0xf6d17a, 0.13)
|
||||
.setStrokeStyle(2, 0xf6d17a, 0.65).setDepth(4);
|
||||
const zone = this.add.zone(item.x + item.width / 2, item.y + item.height / 2, item.width, item.height);
|
||||
this.interactables.push({ type: "exit", id: item.id, x: item.x + item.width / 2, y: item.y + item.height / 2, data: item, sprite: zone });
|
||||
});
|
||||
}
|
||||
@@ -182,9 +180,8 @@
|
||||
createPuzzle() {
|
||||
const puzzle = this.map.puzzle;
|
||||
if (!puzzle || controller.getState().solvedPuzzles.includes(puzzle.id)) return;
|
||||
puzzle.objects.forEach(([id, x, y], index) => {
|
||||
const node = this.add.circle(x, y, 22, 0xd7a949, 0.55).setStrokeStyle(3, 0xffe8a1).setDepth(5);
|
||||
this.add.text(x, y, String(index + 1), { fontFamily: "monospace", fontSize: "16px", color: "#171117" }).setOrigin(0.5).setDepth(6);
|
||||
puzzle.objects.forEach(([id, x, y]) => {
|
||||
const node = this.add.zone(x, y, 38, 38);
|
||||
this.interactables.push({ type: "puzzle", id, puzzle, x, y, sprite: node });
|
||||
});
|
||||
}
|
||||
@@ -193,7 +190,7 @@
|
||||
(this.map.pickups || []).forEach(([id, x, y], index) => {
|
||||
const chestId = `${this.regionId}-${id}-${index}`;
|
||||
if (controller.getState().openedChests.includes(chestId)) return;
|
||||
const item = this.add.star(x, y, 5, 7, 15, 0xf4cf67, 0.9).setStrokeStyle(2, 0xfff0ae).setDepth(6);
|
||||
const item = this.add.zone(x, y, 34, 34);
|
||||
this.interactables.push({ type: "pickup", id, chestId, x, y, sprite: item });
|
||||
});
|
||||
}
|
||||
@@ -345,7 +342,6 @@
|
||||
if (state.solvedPuzzles.includes(puzzle.id)) return;
|
||||
if (puzzle.type === "set") {
|
||||
if (!this.puzzleInput.includes(item.id)) this.puzzleInput.push(item.id);
|
||||
item.sprite.setFillStyle(0xf7e7a1, 0.95);
|
||||
if (this.puzzleInput.length === puzzle.sequence.length) this.finishPuzzle(puzzle.id);
|
||||
else controller.status(`${this.puzzleInput.length} / ${puzzle.sequence.length} mechanisms active.`);
|
||||
return;
|
||||
@@ -357,7 +353,6 @@
|
||||
controller.status("The sequence resets. Look for the environmental clue and try again.");
|
||||
return;
|
||||
}
|
||||
item.sprite.setFillStyle(0xf7e7a1, 0.95);
|
||||
if (this.puzzleInput.length === puzzle.sequence.length) this.finishPuzzle(puzzle.id);
|
||||
else controller.status(`${item.id} answers. ${this.puzzleInput.length} / ${puzzle.sequence.length}.`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user