mirror of
https://github.com/wassname/GarageServer.IO.git
synced 2026-07-01 16:50:06 +08:00
Progress #3
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
exports.onUpdatePlayerPhysics = function (id, state, inputs, deltaTime) {
|
||||
var i = 0;
|
||||
|
||||
if (!state.x && !state.y) {
|
||||
if (!state.x && !state.y) {
|
||||
state.x = 0;
|
||||
state.y = 0;
|
||||
}
|
||||
@@ -20,5 +20,13 @@
|
||||
}
|
||||
return state;
|
||||
};
|
||||
|
||||
exports.onUpdateEntityPhysics = function (id, state, deltaTime) {
|
||||
if (!state.x && !state.y) {
|
||||
state.x = 0;
|
||||
state.y = 0;
|
||||
}
|
||||
state.x += (10 * deltaTime);
|
||||
};
|
||||
|
||||
})(typeof exports === 'undefined' ? window : exports);
|
||||
Reference in New Issue
Block a user