-
Notifications
You must be signed in to change notification settings - Fork 3
/
old-index.html
223 lines (193 loc) · 7.17 KB
/
old-index.html
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<!-- Caching -->
<!-- html manifest="cache.manifest" -->
<head>
<title>Virion</title>
<link type="text/css" href="css/ui-darkness/jquery-ui-1.8.9.custom.css" rel="stylesheet" />
<link type="text/css" href="css/styles.css" rel="stylesheet" />
<style>
body {
background: black;
color: white;
font-family: Arial, sans-serif;
}
</style>
</head>
<!-- Facebook Integration
All of this is just to set g_user_id and g_user_name
-->
<!-- This initialized the SDK so we can use it -->
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js">
</script>
<script>
FB.init({
appId:179028108782663, cookie:true,
status:true, xfbml:true
});
</script>
<div> Login with Facebook to track your high scores! </div>
<!-- FB Login Button -->
<fb:login-button
redirect-uri=window.location>
Login with Facebook
</fb:login-button>
<script>
// If user is already logged in, then refresh to get
// the auth token
if(window.location.hash.length == 0)
{
var url = "https://www.facebook.com/dialog/oauth?client_id= \
179028108782663&redirect_uri=" + window.location +
"&response_type=token";
//window.open(url);
//window.location = url;
FB.getLoginStatus(function(response) {
if (response.session) { //logged in and known
window.location=url;
}
})
} else { // access token in URL
accessToken = window.location.hash.substring(1);
// Only update if hash is from facebook
//console.log(accessToken.indexOf('access_token'));
if (accessToken.indexOf('access_token') !== -1) {
graphUrl = "https://graph.facebook.com/me?" + accessToken +
"&callback=got_user"
//use JSON-P to call the graph
var script = document.createElement("script");
script.src = graphUrl;
document.body.appendChild(script);
}
}
//initialize global user variables to null
g_user_id = null;
g_user_name = null;
// This 'user' object has all the info from fb
function got_user(user) {
//userName.innerText = user.name;
//console.log("user id: " + user.id);
// Error checking, only update if it went correctly
if (user.id) {
//Global vars for Unique User ID and name
g_user_id = user.id;
g_user_name = user.name;
// do scores after setting name and id
//scores.do_scores();
// Display name
console.log("Adding name");
var name_div = document.getElementById('fb_name_div');
name_div.innerHTML = ""; //"Your are logged in as " + g_user_name;
}
else {
console.log("Error in getting facebook info");
}
}
</script>
<p id="userName"></p>
<div id="fb_name_div"> You are not Logged In</div>
<div style="margin: auto; width: 700; align:center;">
<div style="margin-bottom:1em;">Welcome to Virion beta testing! Give the game a try and then scroll down to give us your feedback.</div>
<div style="">
<!-- Score -->
<div id="scores-wrap">
<div id="scores">
Could not load high scores! You may want to check your internet connection.
</div>
</div>
<!-- Game Canvas -->
<canvas width="700" height="600" id="test_canvas">
Your browser does not support the HTML5 canvas element. Upgrade to Chrome, Firefox 4, Safari, or Opera to play this game.
</canvas>
</div>
<div style="">
<h2>Virion Beta Testing Feedback</h2>
<div>
Tell us what you thought of the game by filling out the survey below. You can also email us at <em>viriongame at gmail dot com</em>. Thanks! We appreciate your help. — The Virion Team
</div>
</div>
<iframe src="https://spreadsheets1.google.com/embeddedform?formkey=dEcxNks5Vndqb1dVN2xsSTg0czFkemc6MQ&ttl=0&bc=000&f=Arial&tc=fff&htc=888&lc=f00&hl=en&pli=1" width="700" height="3500" frameborder="0" marginheight="0" marginwidth="0">Loading...</iframe>
</div>
<!-- Jplayer divs
These must be at the beginning (I think before sound.js)
-->
<div id="jquery_jplayer_0" class="jp-jplayer"></div>
<div id="jquery_jplayer_1" class="jp-jplayer"></div>
<div id="jquery_jplayer_2" class="jp-jplayer"></div>
<div id="jquery_jplayer_3" class="jp-jplayer"></div>
<div id="jquery_jplayer_4" class="jp-jplayer"></div>
<div id="jquery_jplayer_5" class="jp-jplayer"></div>
<div id="jquery_jplayer_6" class="jp-jplayer"></div>
<div id="jquery_jplayer_7" class="jp-jplayer"></div>
<div id="jquery_jplayer_8" class="jp-jplayer"></div>
<div id="jquery_jplayer_9" class="jp-jplayer"></div>
<div id="jquery_jplayer_bg_0" class="jp-jplayer"></div>
<div id="jquery_jplayer_bg_1" class="jp-jplayer"></div>
<!-- <audio id="changes" src="C:\Users\JKoh\Music\2Pac\Greatest Hits\05 Changes.mp3" preload="auto">
</audio> -->
<audio id="cell_fire" src="sounds/cell_fire.ogg">
</audio>
<audio id="cell_infect" src="sounds/cell_infect.ogg">
</audio>
<audio id="macrophage_infect" src="sounds/macrophage_infect.ogg">
</audio>
<audio id="heart_loop1" src="sounds/heart_loop1.mp3" preload="auto" loop>
</audio>
<audio id="level_up" src="sounds/level_up.ogg">
</audio>
<audio id="kill" src="sounds/kill.ogg">
</audio>
<!-- Sounds and Images -->
<!--
<script src="processing-1.0.0.min.js"></script>
-->
<script src="processing-1.0.0.js"></script>
<script type="text/javascript" src="php_functions.php"></script>
<script src="jquery-1.4.4.min.js"></script>
<script src="jquery-ui-1.8.9.custom.min.js"></script>
<script type="text/javascript" src="jplayer/jquery.jplayer.min.js"></script>
<script src="global_functions.js"></script>
<script src="sound.js"></script>
<script src="settings.js"></script>
<script src="image_manager.js"></script>
<script src="animated_image.js"></script>
<script src="loading_state.js"></script>
<script src="game_object.js"></script>
<script src="wall_segment.js"></script>
<script src="particle.js"></script>
<script src="cell.js"></script>
<script src="wall_cell.js"></script>
<script src="empty_cell.js"></script>
<script src="floater.js"></script>
<script src="tkiller.js"></script>
<script src="game_state.js"></script>
<script src="in_game_state.js"></script>
<script src="generator.js"> </script>
<script src="rectangle.js"></script>
<script src="options_state.js"></script>
<script src="option_button.js"></script>
<script src="help_state.js"></script>
<script src="splash_state.js"></script>
<script src="button.js"></script>
<script src="state_manager.js"></script>
<script src="pause_state.js"></script>
<script src="game_over_state.js"></script>
<script src="high_scores_state.js"></script>
<script src="num_status_obj.js"></script>
<script src="multiplier.js"></script>
<script src="mutation_obj.js"></script>
<script src="seeker.js"></script>
<script src="b_cell.js"></script>
<script src="antibody.js"></script>
<script src="random_image_selector.js"></script>
<script src="background_object.js"></script>
<script src="background_edge.js"></script>
<script src="object_with_states.js"></script>
<script src="notification.js"></script>
<script src="fisforformat.min.js"></script>
<script src="scores/scores.js"></script>
<script src="test.js"></script>
<!-- <script src="rgbcolor.js"></script>
<script src="canvg.js"></script> -->
<script>
//scores.do_scores();
</script>