Завершить контентную архитектуру этапа 4
This commit is contained in:
@@ -2,41 +2,6 @@ package com.projectsacrifice.game;
|
||||
|
||||
/** All player-facing copy behind one typed, Android-independent interface. */
|
||||
public final class GameStrings {
|
||||
private static final String[] EN_TITLES = {
|
||||
"The Volunteer", "A Useful End", "Dead Weight", "The Long Lift",
|
||||
"Express Delivery", "Cold Comfort", "Live Wire", "Borrowed Time",
|
||||
"Two Good Reasons", "The Last Procession"
|
||||
};
|
||||
private static final String[] RU_TITLES = {
|
||||
"Рыцарь-доброволец", "Полезный конец", "Мёртвый груз", "Долгий подъём",
|
||||
"Срочная доставка", "Холодное утешение", "Живой провод", "Время взаймы",
|
||||
"Две веские причины", "Последнее шествие"
|
||||
};
|
||||
private static final String[] EN_HINTS = {
|
||||
"Reach the relic. Arrows move; the winged button jumps.",
|
||||
"The spikes keep every volunteer. Build a path from what remains.",
|
||||
"Leave a body on the brass plate so the next volunteer can pass.",
|
||||
"Touch the lever, then ride the moving platform to the upper gallery.",
|
||||
"The saw throws to the right. Deliver a volunteer to the distant plate.",
|
||||
"The frost makes a solid block. Use the frozen volunteer as a step.",
|
||||
"A fallen volunteer conducts the current and keeps the relay alive.",
|
||||
"Jump for the far blue relay if the timed gate closes.",
|
||||
"The final gate needs weight and power at the same time.",
|
||||
"Launch, freeze, conduct, ascend. Every lesson opens the last relic."
|
||||
};
|
||||
private static final String[] RU_HINTS = {
|
||||
"Доберитесь до реликвии. Стрелки двигают; кнопка с крылом — прыжок.",
|
||||
"Шипы сохраняют каждого добровольца. Проложите путь из того, что осталось.",
|
||||
"Оставьте тело на латунной плите, чтобы следующий доброволец прошёл.",
|
||||
"Коснитесь рычага, затем поднимитесь на платформе к верхней галерее.",
|
||||
"Пила бросает вправо. Доставьте добровольца на дальнюю плиту.",
|
||||
"Мороз создаёт твёрдый блок. Используйте замёрзшего добровольца как ступень.",
|
||||
"Павший доброволец проводит ток и поддерживает реле.",
|
||||
"Прыгните к дальнему синему реле, если ворота по таймеру закроются.",
|
||||
"Последним воротам одновременно нужны вес и питание.",
|
||||
"Разгонитесь, замёрзните, проведите ток, поднимитесь. Каждый урок открывает последнюю реликвию."
|
||||
};
|
||||
|
||||
private final GameLanguage language;
|
||||
|
||||
private GameStrings(GameLanguage language) {
|
||||
@@ -308,11 +273,13 @@ public final class GameStrings {
|
||||
}
|
||||
|
||||
public String levelTitle(int oneBasedLevelNumber) {
|
||||
return (russian() ? RU_TITLES : EN_TITLES)[levelIndex(oneBasedLevelNumber)];
|
||||
LevelDefinition level = level(oneBasedLevelNumber);
|
||||
return russian() ? level.titleRu : level.title;
|
||||
}
|
||||
|
||||
public String levelHint(int oneBasedLevelNumber) {
|
||||
return (russian() ? RU_HINTS : EN_HINTS)[levelIndex(oneBasedLevelNumber)];
|
||||
LevelDefinition level = level(oneBasedLevelNumber);
|
||||
return russian() ? level.hintRu : level.hint;
|
||||
}
|
||||
|
||||
private String volunteerWord(int count) {
|
||||
@@ -329,8 +296,9 @@ public final class GameStrings {
|
||||
return index >= 0 && index <= 2 ? index : 1;
|
||||
}
|
||||
|
||||
private static int levelIndex(int oneBasedLevelNumber) {
|
||||
private static LevelDefinition level(int oneBasedLevelNumber) {
|
||||
int index = oneBasedLevelNumber - 1;
|
||||
return index >= 0 && index < EN_TITLES.length ? index : 0;
|
||||
if (index < 0 || index >= LevelCatalog.all().size()) index = 0;
|
||||
return LevelCatalog.get(index);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user