Добавить production-каталог опасностей

This commit is contained in:
2026-08-19 05:30:56 +03:00
parent cc7f487cf7
commit dc2ebcbf8c
33 changed files with 1160 additions and 37 deletions
@@ -6,7 +6,9 @@ import java.util.List;
/** Immutable, Android-independent level data. */
public final class LevelDefinition {
public enum HazardType { SPIKES, SAW, FREEZER, ELECTRIC, PIT }
public enum HazardType {
SPIKES, SAW, FREEZER, ELECTRIC, PIT, CRUSHER, FIRE, PROJECTILE, EXPLOSION
}
public enum SwitchType { PRESSURE, TOGGLE, TIMED }
public static final class Box {
@@ -54,17 +56,36 @@ public final class LevelDefinition {
public final String relayId;
public final float impulseX;
public final float impulseY;
public final float cycleSeconds;
public final float activeSeconds;
public final float speedX;
public final float speedY;
public final String visualStyle;
public final String audioCue;
public Hazard(HazardType type, Box box) {
this(type, box, null, 0f, 0f);
}
public Hazard(HazardType type, Box box, String relayId, float impulseX, float impulseY) {
this(type, box, relayId, impulseX, impulseY,
0f, 0f, 0f, 0f, null, null);
}
public Hazard(HazardType type, Box box, String relayId, float impulseX, float impulseY,
float cycleSeconds, float activeSeconds, float speedX, float speedY,
String visualStyle, String audioCue) {
this.type = type;
this.box = box;
this.relayId = relayId;
this.impulseX = impulseX;
this.impulseY = impulseY;
this.cycleSeconds = cycleSeconds;
this.activeSeconds = activeSeconds;
this.speedX = speedX;
this.speedY = speedY;
this.visualStyle = visualStyle;
this.audioCue = audioCue;
}
}