forked from sys5867/ctp441-game-project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
scene08.js
34 lines (29 loc) · 836 Bytes
/
scene08.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
// This allows the Javascript code inside this block to only run when the page
// has finished loading in the browser.
function showTheChat(chat, sec) {
setTimeout(function () {
chat.style.display = "block";
}, sec);
}
var c1 = document.getElementById("c1");
var c2 = document.getElementById("c2");
var c3 = document.getElementById("c3");
var c4 = document.getElementById("c4");
var c5 = document.getElementById("c5");
var c6 = document.getElementById("c6");
var c7 = document.getElementById("c7");
var chatlist = [];
chatlist.push(c1);
chatlist.push(c2);
chatlist.push(c3);
chatlist.push(c4);
chatlist.push(c5);
chatlist.push(c6);
chatlist.push(c7);
for (var i = 0; i < 7; i++) {
console.log(i);
chatlist[i].style.display = 'none';
}
for (var i = 0; i < 7; i++) {
showTheChat(chatlist[i], i * 2000);
}