Skip to content

Commit cd99cf2

Browse files
committed
DONE! tinggal halaman untuk monitor multiplayer
1 parent bcb0fb9 commit cd99cf2

12 files changed

+1140
-56
lines changed

css/style.css

+15
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,21 @@ body, #c {
2727
z-index: 1;
2828
}
2929

30+
#waiting {
31+
font-size: 2.8em;
32+
font-family: 'Courier New', Courier, monospace;
33+
font-weight: lighter;
34+
color: white;
35+
position: absolute;
36+
top: 50%;
37+
width: 100%;
38+
text-align: center;
39+
display:block;
40+
font-weight: bold;
41+
text-shadow: 2px 2px #2915A7;
42+
z-index: 1;
43+
}
44+
3045
#perfect {
3146
font-size: 2.5em;
3247
font-family: 'Courier New', Courier, monospace;

js/app.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const Scene = require('./scene');
33
const Brick = require('./brick');
44
const FallingBrick = require('./fallingbrick');
55
const Queue = require('./queue');
6-
const socket = require('socket.io-client')(window.location.host);
6+
// const socket = require('socket.io-client')(window.location.host);
77
const Physijs = require('physijs-webpack/browserify');
88

99
//==================
@@ -85,16 +85,16 @@ init();
8585
//=======================
8686
//-----Socket client-----
8787
//=======================
88-
const roomName = 'nganu';
89-
socket.emit('join', roomName);
88+
// const roomName = 'nganu';
89+
// socket.emit('join', roomName);
9090
//-----------------------
91-
socket.on('keyboardEvent', function(data) {
91+
// socket.on('keyboardEvent', function(data) {
9292
// console.log(data);
93-
});
93+
// });
9494

95-
socket.on('deviceOrientation', function(data) {
95+
// socket.on('deviceOrientation', function(data) {
9696
// console.log(data);
97-
});
97+
// });
9898

9999
// socket.on('sync', function(data) {
100100
// // console.log(data);
@@ -176,7 +176,7 @@ function loop() {
176176
message.property.push(object);
177177
}
178178

179-
socket.emit('sync', message);
179+
// socket.emit('sync', message);
180180
nambahlagu();
181181
break;
182182

0 commit comments

Comments
 (0)