2016-02-10 20:59:07 +11:00
|
|
|
<!-- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -->
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8" />
|
2016-02-11 04:48:47 +11:00
|
|
|
<title>nodePong, a multiplayer online pong based on nodejs and socket.io</title>
|
2016-02-10 20:59:07 +11:00
|
|
|
<link rel="stylesheet" type="text/css" media="all" href="./css/main.css">
|
|
|
|
<script type="text/javascript" src="http://127.0.0.1:8042/socket.io/socket.io.js"></script>
|
|
|
|
<script type="text/javascript" src="./src/jquery-2.1.3.min.js"></script>
|
2016-02-11 04:48:47 +11:00
|
|
|
<script type="text/javascript" src="./js/NPGClient.js"></script>
|
|
|
|
<script type="text/javascript" src="./js/socket/SocketIO.js"></script>
|
2016-02-10 20:59:07 +11:00
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
<div id="main">
|
|
|
|
<canvas id="pong" width="800" height="500">
|
|
|
|
</canvas>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
|
|
|
|
</html>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(document).ready(function() {
|
2016-02-11 04:48:47 +11:00
|
|
|
NPGClient.SocketIO.startConnectLoop();;
|
|
|
|
if (NPGClient.SocketIO.isConnected) NPGClient.SocketIO.socket.emit('data','yo');
|
2016-02-10 20:59:07 +11:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|