summaryrefslogtreecommitdiff
path: root/shared/src/main/java/kz/ilotterytea/frogartha/events/PlayerJumpEvent.java
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2025-01-22 01:17:55 +0500
committerilotterytea <iltsu@alright.party>2025-01-22 01:38:15 +0500
commit5bee4a945e39cce294b79f0d55f84e16a0e43ca3 (patch)
tree9c03ebe35492aab6fd52698af360084fdc9245a3 /shared/src/main/java/kz/ilotterytea/frogartha/events/PlayerJumpEvent.java
parente745580e571725cef4f8e22302500ee521237786 (diff)
upd: moved some files
Diffstat (limited to 'shared/src/main/java/kz/ilotterytea/frogartha/events/PlayerJumpEvent.java')
-rw-r--r--shared/src/main/java/kz/ilotterytea/frogartha/events/PlayerJumpEvent.java58
1 files changed, 0 insertions, 58 deletions
diff --git a/shared/src/main/java/kz/ilotterytea/frogartha/events/PlayerJumpEvent.java b/shared/src/main/java/kz/ilotterytea/frogartha/events/PlayerJumpEvent.java
deleted file mode 100644
index a084555..0000000
--- a/shared/src/main/java/kz/ilotterytea/frogartha/events/PlayerJumpEvent.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package kz.ilotterytea.frogartha.events;
-
-import com.badlogic.gdx.math.Vector3;
-import com.github.czyzby.websocket.serialization.SerializationException;
-import com.github.czyzby.websocket.serialization.Transferable;
-import com.github.czyzby.websocket.serialization.impl.Deserializer;
-import com.github.czyzby.websocket.serialization.impl.Serializer;
-
-public class PlayerJumpEvent extends Event implements Transferable<PlayerJumpEvent> {
- private Vector3 startPosition, endPosition;
- private float jumpStrength;
-
- public PlayerJumpEvent() {
- super();
- }
-
- public PlayerJumpEvent(Integer playerId, Vector3 startPosition, Vector3 endPosition, Float jumpStrength) {
- super(playerId);
- this.startPosition = startPosition;
- this.endPosition = endPosition;
- this.jumpStrength = jumpStrength;
- }
-
- public Vector3 getStartPosition() {
- return startPosition;
- }
-
- public Vector3 getEndPosition() {
- return endPosition;
- }
-
- public float getJumpStrength() {
- return jumpStrength;
- }
-
- @Override
- public void serialize(Serializer serializer) throws SerializationException {
- serializer
- // id
- .serializeInt(playerId)
- // start position
- .serializeFloatArray(new float[]{startPosition.x, startPosition.y, startPosition.z})
- // end position
- .serializeFloatArray(new float[]{endPosition.x, endPosition.y, endPosition.z})
- // jump strength
- .serializeFloat(jumpStrength);
- }
-
- @Override
- public PlayerJumpEvent deserialize(Deserializer deserializer) throws SerializationException {
- return new PlayerJumpEvent(
- deserializer.deserializeInt(),
- new Vector3(deserializer.deserializeFloatArray()),
- new Vector3(deserializer.deserializeFloatArray()),
- deserializer.deserializeFloat()
- );
- }
-}