Commit a727026b authored by Vũ Gia Vương's avatar Vũ Gia Vương

--init branch multi-core

parent 9638dab2
...@@ -137,6 +137,7 @@ async function passTower(socket: Socket, data: IRequestPassTower, user: User) { ...@@ -137,6 +137,7 @@ async function passTower(socket: Socket, data: IRequestPassTower, user: User) {
// xDistance_ += speed * DT; // xDistance_ += speed * DT;
// } // }
const acceleration = Math.min(towerNumber - MAX_TOWER, A_POWER) * DT; const acceleration = Math.min(towerNumber - MAX_TOWER, A_POWER) * DT;
speed += data.step * acceleration; speed += data.step * acceleration;
xDistance_ += INIT_SPEED * data.step * DT + acceleration * DT * (data.step * (data.step - 1)) / 2; xDistance_ += INIT_SPEED * data.step * DT + acceleration * DT * (data.step * (data.step - 1)) / 2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment