All checks were successful
Create and publish a Docker image 🚀 / build-and-push-image (push) Successful in 1m11s
20 lines
311 B
Go
20 lines
311 B
Go
package models
|
|
|
|
type MsgType string
|
|
|
|
const (
|
|
InputMsgType MsgType = "input"
|
|
ChatMsgType MsgType = "chat"
|
|
)
|
|
|
|
type InputMessage struct {
|
|
PlayerID int64
|
|
DX float64 `json:"dx"`
|
|
DY float64 `json:"dy"`
|
|
}
|
|
|
|
type StateMessage struct {
|
|
Type MsgType `json:"type"`
|
|
Payload any `json:"payload"`
|
|
}
|