You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
88 lines
1.8 KiB
88 lines
1.8 KiB
2 years ago
|
declare module Serialized{
|
||
|
interface GameObject{
|
||
|
id: string
|
||
|
}
|
||
|
interface Game extends GameObject{
|
||
|
players: Player[]
|
||
|
balls: Ball[]
|
||
|
boosts: Boost[]
|
||
|
wormholes: Wormhole[]
|
||
|
newBalls: NewBall[]
|
||
|
}
|
||
|
interface Lobby extends GameObject{
|
||
|
game: string
|
||
|
clientCounts: number[]
|
||
|
clients: Client[]
|
||
|
}
|
||
|
interface Client extends GameObject{
|
||
|
name: string
|
||
|
game: string
|
||
|
}
|
||
|
interface Ball extends GameObject{
|
||
|
pos: Vector
|
||
|
vel: Vector
|
||
|
color: Color
|
||
|
radius: number
|
||
|
runningUp: boolean
|
||
|
nextStep: Vector
|
||
|
}
|
||
|
interface Player extends GameObject{
|
||
|
pos: Vector
|
||
|
dim: Vector
|
||
|
vel: Vector
|
||
|
margin: number
|
||
|
moveMargin: number
|
||
|
color: Color
|
||
|
points: number
|
||
|
lobby: Lobby
|
||
|
input: Player.Input
|
||
|
boosts: ActiveBoost[]
|
||
|
frameRate: number
|
||
|
vision: boolean
|
||
|
}
|
||
|
interface Item extends GameObject{
|
||
|
pos: Vector
|
||
|
radius: number
|
||
|
color: Color
|
||
|
time: TimeProcess
|
||
|
currentRadius: number
|
||
|
}
|
||
|
interface Wormhole extends Item{
|
||
|
|
||
|
}
|
||
|
interface Boost extends Item{
|
||
|
type: string
|
||
|
bool: string
|
||
|
}
|
||
|
interface NewBall extends Item{
|
||
|
|
||
|
}
|
||
|
interface ActiveBoost extends GameObject{
|
||
|
type: string
|
||
|
bool: string
|
||
|
positive: boolean
|
||
|
time: TimeProcess
|
||
|
color: Color
|
||
|
}
|
||
|
interface Vector{
|
||
|
x: number
|
||
|
y: number
|
||
|
}
|
||
|
interface Color{
|
||
|
stroke: string
|
||
|
fill: string
|
||
|
}
|
||
|
interface TimeProcess{
|
||
|
max: number
|
||
|
now: number
|
||
|
finished: boolean
|
||
|
}
|
||
|
module Player{
|
||
|
interface Input{
|
||
|
up: boolean
|
||
|
down: boolean
|
||
|
left: boolean
|
||
|
right: boolean
|
||
|
}
|
||
|
}
|
||
|
}
|