vvandenb
2 years ago
3 changed files with 32 additions and 23 deletions
@ -1,20 +1,21 @@ |
|||||
import { Point } from "./utils"; |
import { Point } from './utils' |
||||
|
|
||||
export const GAME_EVENTS = { |
export const GAME_EVENTS = { |
||||
START_GAME: "START_GAME", |
START_GAME: 'START_GAME', |
||||
READY: "READY", |
READY: 'READY', |
||||
GAME_TICK: "GAME_TICK", |
GAME_TICK: 'GAME_TICK', |
||||
PLAYER_MOVE: "PLAYER_MOVE", |
PLAYER_MOVE: 'PLAYER_MOVE', |
||||
GET_GAME_INFO: "GET_GAME_INFO", |
GET_GAME_INFO: 'GET_GAME_INFO', |
||||
CREATE_GAME: "CREATE_GAME", |
CREATE_GAME: 'CREATE_GAME', |
||||
REGISTER_PLAYER: "REGISTER_PLAYER", |
REGISTER_PLAYER: 'REGISTER_PLAYER', |
||||
MATCHMAKING: "MATCHMAKING", |
MATCHMAKING: 'MATCHMAKING', |
||||
LEAVE_GAME: "LEAVE_GAME", |
LEAVE_GAME: 'LEAVE_GAME' |
||||
}; |
} |
||||
|
|
||||
export const DEFAULT_MAP_SIZE = new Point(600, 400); |
export const DEFAULT_MAP_SIZE = new Point(500, 400) |
||||
export const DEFAULT_PADDLE_SIZE = new Point(6, 50); |
export const DEFAULT_PADDLE_SIZE = new Point(6, 30) |
||||
export const DEFAULT_BALL_SIZE = new Point(20, 20); |
export const DEFAULT_BALL_SIZE = new Point(10, 10) |
||||
export const DEFAULT_PLAYER_X_OFFSET = 50; |
export const DEFAULT_BALL_INITIAL_SPEED = new Point(10, 2) |
||||
export const DEFAULT_WIN_SCORE = 5; |
export const DEFAULT_PLAYER_X_OFFSET = 50 |
||||
export const GAME_TICKS = 30; |
export const DEFAULT_WIN_SCORE = 5 |
||||
|
export const GAME_TICKS = 30 |
||||
|
Loading…
Reference in new issue