~starkingdoms/starkingdoms

ref: 603d2bb46d38fa7d4c46df4cb9aad895916ec011 starkingdoms/client/src/protocol/state.ts -rw-r--r-- 670 bytes
603d2bb4 — c0repwn3r work on callback 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* eslint-disable */

export const protobufPackage = "protocol.state";

export enum State {
  Handshake = 0,
  Play = 1,
  UNRECOGNIZED = -1,
}

export function stateFromJSON(object: any): State {
  switch (object) {
    case 0:
    case "Handshake":
      return State.Handshake;
    case 1:
    case "Play":
      return State.Play;
    case -1:
    case "UNRECOGNIZED":
    default:
      return State.UNRECOGNIZED;
  }
}

export function stateToJSON(object: State): string {
  switch (object) {
    case State.Handshake:
      return "Handshake";
    case State.Play:
      return "Play";
    case State.UNRECOGNIZED:
    default:
      return "UNRECOGNIZED";
  }
}