-
Notifications
You must be signed in to change notification settings - Fork 0
/
data.js
64 lines (63 loc) · 1.54 KB
/
data.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
* data.js -- Dom & Game Settings
*
* Codes from Jack Works([email protected])
* And idea is from Scott Shen([email protected])
*
* Vola Studio 2014.
*
* You can change the game settings in
* var settings = { ...
*/
var doms = {
environment : $("#game_env"),
target : $("#game_tg"),
source : $("#game_sc"),
message_templet : $("#msg"),
board : $("#game_board_mask"),
board_points : $(".board_points"),
board_msg : $("#game_title"),
restart_btn : $(".start"),
settings_title : $("#settings_title"),
menu_to_settings : $(".settings"),
menu : $(".game_menu"),
settings : $(".game_settings"),
settings_btn : $(".settings_btn"),
settings_apply : $(".settings_apply")
}
var dom = {
menu: {
about: $("#menu_about"),
inf: $("#menu_inf"),
classic: $("#menu_classic"),
settings: $("#menu_settings")
},
about: {},
game: {
environment: $("#game_env"),
target: $("#game_tg"),
source: $("#game_sc"),
tile: {
start: $(".game_board_tile.start"),
mode: $(".game_board_tile.mode"),
score: $(".game_board_tile.score span"),
exit: $(".game_board_tile.exit")
}
},
settings: {
}
}
/*
* settings.tgr is the size of the target circle
* settings.tolerance is the mistake the game will accept
* if you don't click the source cirle in (settings.speed + random number)ms, you will lose the game
*/
var settings = {
tgr: 100,
tolerance: 20,
speed: 900
}
var data = {
points: 0,
bestPoints: 0,
}