fix auto-attack targeting
This commit is contained in:
@@ -184,8 +184,6 @@ function connectWebSocket() {
|
||||
entity.position.set(e.position.x / 100, e.position.y / 100, e.height / 100)
|
||||
scene.add(entity)
|
||||
|
||||
// TODO: player model out of basic geometries
|
||||
|
||||
const hpMargin = 0.4
|
||||
const maxHp = new THREE.Sprite(new THREE.SpriteMaterial({ color: 0xd03333 }))
|
||||
maxHp.position.set(0, (e.height / 100) + hpMargin, 0)
|
||||
@@ -386,13 +384,6 @@ window.addEventListener('load', () => {
|
||||
if (event.code == 'KeyE') {
|
||||
websocket.send(JSON.stringify({ action: 'cast', slot: 3, id: playerId, x, y }))
|
||||
}
|
||||
|
||||
if (event.code == 'KeyD') {
|
||||
websocket.send(JSON.stringify({ action: 'teleport', id: playerId, x, y }))
|
||||
}
|
||||
if (event.code == 'KeyF') {
|
||||
websocket.send(JSON.stringify({ action: 'teleport', id: playerId, x, y }))
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user