content/hifi-content/thoys/dev/2017/whackAMole/constants.js
2022-02-14 02:04:11 +01:00

55 lines
1.2 KiB
JavaScript

//
// whackAMole/constants.js
//
// Created by Thijs Wenker on 5/10/17.
// Copyright 2017 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
/* global module */
// @module constants
module.exports = {
// Are we in debug mode?
DEBUG: true,
DEBUG_CLICK: false,
// Play background sounds?
PLAY_SOUND: true,
SESSION_TIME: 30, // Default time of a game (30s)
// Some constants which are used in identifying the model entities
MOLE_IDENTIFIER_PREFIX: 'wam_',
MOLE_IDENTIFIER_NUM_CHARS: 7,
MOLE_IDENTIFIER_COLUMN_INDEX: 4,
MOLE_IDENTIFIER_SEPARATOR: 5,
MOLE_IDENTIFIER_ROW_INDEX: 6,
MOLE_COLLIDER_PREFIX: 'wam_hole_collider_',
MALLET_TIMEOUT_SEC: 5.0,
// Play field size
MOLE_GRID_COLUMNS: 3,
MOLE_GRID_ROWS: 3,
PLAYER_ONE: 0,
PLAYER_TWO: 1,
// Prefix for the server, will be followed up by the console entityID
SERVER_CHANNEL_PREFIX: 'WhackAMole_',
MILLISECONDS_PER_SECOND: 1000,
MOLE_STATE: {
DOWN: 0,
LURE: 1,
POPUP: 2,
UP: 3,
DROPDOWN: 4
}
};