mirror of
https://github.com/wassname/GarageServer.IO.git
synced 2026-07-10 00:20:07 +08:00
Progress: client loops
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
$(function () {
|
||||
GarageServerIO.connectToGarageServer('http://garageserver_io.jbillmann.c9.io', { logging: true });
|
||||
GarageServerIO.connectToGarageServer('http://garageserver_io.jbillmann.c9.io', { logging: false });
|
||||
|
||||
var gameCanvas = document.getElementById('gameCanvas'),
|
||||
|
||||
@@ -36,7 +36,10 @@ $(function () {
|
||||
|
||||
draw = function () {
|
||||
ctxGameCanvas.clearRect(0, 0, gameCanvas.width, gameCanvas.height);
|
||||
ctxGameCanvas.fillRect(x, y, 10, 10);
|
||||
|
||||
GarageServerIO.getPlayerStates(function (state) {
|
||||
ctxGameCanvas.fillRect(state.x, state.y, 10, 10);
|
||||
});
|
||||
},
|
||||
|
||||
update = function () {
|
||||
|
||||
Reference in New Issue
Block a user