Добавить production-состояния тел

This commit is contained in:
2026-08-19 06:34:40 +03:00
parent dc2ebcbf8c
commit 19bb64edfb
21 changed files with 580 additions and 31 deletions
@@ -43,7 +43,7 @@ public final class GameSessionSnapshot {
public static final class BodyData {
private final float x, y, width, height, velocityX, velocityY;
private final boolean frozen, conductive, pinned, grounded;
private final boolean frozen, conductive, pinned, grounded, crushed, burned;
private final int supportIndex;
private final String deathType;
@@ -51,6 +51,15 @@ public final class GameSessionSnapshot {
float velocityX, float velocityY, boolean frozen,
boolean conductive, boolean pinned, boolean grounded,
int supportIndex, String deathType) {
this(x, y, width, height, velocityX, velocityY, frozen, conductive,
pinned, grounded, false, false, supportIndex, deathType);
}
public BodyData(float x, float y, float width, float height,
float velocityX, float velocityY, boolean frozen,
boolean conductive, boolean pinned, boolean grounded,
boolean crushed, boolean burned,
int supportIndex, String deathType) {
this.x = x;
this.y = y;
this.width = width;
@@ -61,6 +70,8 @@ public final class GameSessionSnapshot {
this.conductive = conductive;
this.pinned = pinned;
this.grounded = grounded;
this.crushed = crushed;
this.burned = burned;
this.supportIndex = supportIndex;
this.deathType = deathType == null ? "SPIKE" : deathType;
}
@@ -75,6 +86,8 @@ public final class GameSessionSnapshot {
public boolean conductive() { return conductive; }
public boolean pinned() { return pinned; }
public boolean grounded() { return grounded; }
public boolean crushed() { return crushed; }
public boolean burned() { return burned; }
public int supportIndex() { return supportIndex; }
public String deathType() { return deathType; }
}