fix: adjust interactivity bounds
This commit is contained in:
parent
6eac298671
commit
f7e4bd0e36
|
@ -9,16 +9,16 @@ export default class Interacts extends Component {
|
|||
let x0 = Position.x - 8;
|
||||
let y0 = Position.y - 8;
|
||||
if (0 === Direction.direction) {
|
||||
y0 -= 16
|
||||
y0 -= 12
|
||||
}
|
||||
if (1 === Direction.direction) {
|
||||
x0 += 16
|
||||
x0 += 12
|
||||
}
|
||||
if (2 === Direction.direction) {
|
||||
y0 += 16
|
||||
y0 += 12
|
||||
}
|
||||
if (3 === Direction.direction) {
|
||||
x0 -= 16
|
||||
x0 -= 12
|
||||
}
|
||||
return {x0, x1: x0 + 15, y0, y1: y0 + 15};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user