feat: connected deserializers to classes
This commit is contained in:
parent
6947105077
commit
f09b9e2388
@ -1,13 +1,19 @@
|
|||||||
package uulm.teamname.marvelous.gamelibrary.entities;
|
package uulm.teamname.marvelous.gamelibrary.entities;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||||
|
import uulm.teamname.marvelous.gamelibrary.json.ingame.EntityIDDeserializer;
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/** Represents a distinct identification for every {@link Entity} in a game. */
|
/** Represents a distinct identification for every {@link Entity} in a game. */
|
||||||
|
@JsonDeserialize(using = EntityIDDeserializer.class)
|
||||||
public class EntityID {
|
public class EntityID {
|
||||||
/** The index of the entity */
|
/** The index of the entity */
|
||||||
public final int id;
|
public final int id;
|
||||||
|
|
||||||
/** The type of the entity */
|
/** The type of the entity */
|
||||||
|
@JsonProperty("entityID")
|
||||||
public final EntityType type;
|
public final EntityType type;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
package uulm.teamname.marvelous.gamelibrary.events;
|
package uulm.teamname.marvelous.gamelibrary.events;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||||
|
import uulm.teamname.marvelous.gamelibrary.json.ingame.EventDeserializer;
|
||||||
import uulm.teamname.marvelous.gamelibrary.json.ingame.MessageStructure;
|
import uulm.teamname.marvelous.gamelibrary.json.ingame.MessageStructure;
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/** Represents an abstract event sent inside a {@link MessageStructure} between client and server. */
|
/** Represents an abstract event sent inside a {@link MessageStructure} between client and server. */
|
||||||
|
@JsonDeserialize(using = EventDeserializer.class)
|
||||||
public abstract class Event {
|
public abstract class Event {
|
||||||
public EventType type;
|
public EventType type;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user