middle of the re-work
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package pong
|
||||
|
||||
type GameState struct {
|
||||
Message string
|
||||
Winner string
|
||||
Score map[string]int
|
||||
Player1 Player
|
||||
Player2 Player
|
||||
@@ -16,10 +18,16 @@ type Player struct {
|
||||
client GameClient
|
||||
Pos Vector
|
||||
Size Vector
|
||||
Speed float32
|
||||
}
|
||||
|
||||
type Ball struct {
|
||||
Pos Vector
|
||||
Vel Vector
|
||||
}
|
||||
|
||||
type StateUpdate struct {
|
||||
// The field to update on the state object dot separated
|
||||
// I.e Player1.Speed = the speed field on Player1
|
||||
FieldPath string
|
||||
Value []byte
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user