Weiter an den Dialogen gearbeitet
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
package de.blight.common;
|
||||
|
||||
/** Einzeln platzierter Vertex-Gras-Halm. Y-Position wird beim Platzieren aus dem Terrain gebacken. */
|
||||
public record GrassVertexBlade(float x, float y, float z, float height, float dryness) {}
|
||||
public record GrassVertexBlade(float x, float y, float z, float height, float dryness, int seedIdx) {
|
||||
/** Rückwärts-kompatibler Konstruktor ohne Samen-Index. */
|
||||
public GrassVertexBlade(float x, float y, float z, float height, float dryness) {
|
||||
this(x, y, z, height, dryness, -1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,11 +11,12 @@ import java.util.zip.*;
|
||||
*
|
||||
* Format v1: int MAGIC, int VERSION, int count, N × (float x, float y, float z, float height)
|
||||
* Format v2: wie v1 + float dryness pro Halm (0=grün, 0.5–1.0=gelb/braun)
|
||||
* Format v3: wie v2 + byte seedIdx pro Halm (−1=kein Samen, ≥0=Textur-Index)
|
||||
*/
|
||||
public final class GrassVertexIO {
|
||||
|
||||
private static final int MAGIC = 0x47565458; // "GVTX"
|
||||
private static final int VERSION = 2;
|
||||
private static final int VERSION = 3;
|
||||
|
||||
private GrassVertexIO() {}
|
||||
|
||||
@@ -37,6 +38,7 @@ public final class GrassVertexIO {
|
||||
out.writeFloat(b.z());
|
||||
out.writeFloat(b.height());
|
||||
out.writeFloat(b.dryness());
|
||||
out.writeByte(Math.max(-1, Math.min(126, b.seedIdx())));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -58,7 +60,8 @@ public final class GrassVertexIO {
|
||||
float z = in.readFloat();
|
||||
float h = in.readFloat();
|
||||
float dr = version >= 2 ? in.readFloat() : 0f;
|
||||
list.add(new GrassVertexBlade(x, y, z, h, dr));
|
||||
int si = version >= 3 ? in.readByte() : -1;
|
||||
list.add(new GrassVertexBlade(x, y, z, h, dr, si));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -24,6 +24,12 @@ public class DialogOption {
|
||||
private TextReference textNpc;
|
||||
private AudioReference audioNpc;
|
||||
|
||||
/** Animations-Clip, der beim Start der NPC-Antwort einmalig gespielt wird (z. B. "talk1"). */
|
||||
private String npcAnimation;
|
||||
|
||||
private List<DialogStep> heroSteps = new ArrayList<>();
|
||||
private List<DialogStep> npcSteps = new ArrayList<>();
|
||||
|
||||
private transient List<DialogOption> nextOptions;
|
||||
private transient List<DialogOption> disablesOptions;
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package de.blight.common.model;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class DialogStep {
|
||||
private TextReference text;
|
||||
private AudioReference audio;
|
||||
}
|
||||
@@ -10,8 +10,8 @@ import java.util.List;
|
||||
*/
|
||||
public class DayTime {
|
||||
|
||||
/** Standard-Tagesdauer in Echtzeit-Sekunden (5 Minuten). */
|
||||
public static final float DEFAULT_DAY_DURATION = 300f;
|
||||
/** Standard-Tagesdauer in Echtzeit-Sekunden (15 Minuten). */
|
||||
public static final float DEFAULT_DAY_DURATION = 900f;
|
||||
|
||||
private float timeOfDay;
|
||||
private float timeScale;
|
||||
|
||||
Reference in New Issue
Block a user