统一变量命名风格
This commit is contained in:
parent
6c2595d35c
commit
05770cf502
@ -155,12 +155,12 @@ class Map():
|
|||||||
elif self.background_type in c.ON_ROOF_BACKGROUNDS:
|
elif self.background_type in c.ON_ROOF_BACKGROUNDS:
|
||||||
x -= c.MAP_ROOF_OFFSET_X
|
x -= c.MAP_ROOF_OFFSET_X
|
||||||
y -= c.MAP_ROOF_OFFSET_X
|
y -= c.MAP_ROOF_OFFSET_X
|
||||||
gridX = x // c.GRID_ROOF_X_SIZE
|
grid_x = x // c.GRID_ROOF_X_SIZE
|
||||||
if gridX >= 5:
|
if grid_x >= 5:
|
||||||
gridY = y // c.GRID_ROOF_Y_SIZE
|
grid_y = y // c.GRID_ROOF_Y_SIZE
|
||||||
else:
|
else:
|
||||||
gridY = (y - 20*(6 - gridX)) // 85
|
grid_y = (y - 20*(6 - grid_x)) // 85
|
||||||
return (gridX, gridY)
|
return (grid_x, grid_y)
|
||||||
else:
|
else:
|
||||||
x -= c.MAP_OFFSET_X
|
x -= c.MAP_OFFSET_X
|
||||||
y -= c.MAP_OFFSET_Y
|
y -= c.MAP_OFFSET_Y
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user