Open ryyugang opened 2 months ago
μλ¬ μμΉ: GameScene.js - constructor - this.socket.on("message", ...
case "move":
// console.log(data);
const user = data.user;
// μμ§μΈ μ μ μ λ³΄λ§ λ°μμμ κ°±μ ν΄μ£ΌκΈ°
if (this.OPlayer[user.uid]) {
const otherPlayer = this.OPlayer[user.uid];
if (otherPlayer.x !== user.x || otherPlayer.y !== user.y) {
otherPlayer.moveTo(user.x, user.y, user.direction);
otherPlayer.setMoving(true);
} else {
otherPlayer.setMoving(false);
}
}
break;
π Describe
π Logs
π Environment
localhost νκ²½μμ λͺ©κ²©
π°οΈ Estimated Time of Completion
γ γ
ππ» More
No response