refactor code structure
This commit is contained in:
18
module/__init__.py
Normal file
18
module/__init__.py
Normal file
@@ -0,0 +1,18 @@
|
||||
WIDTH, HEIGHT = 800, 600
|
||||
|
||||
# 颜色定义
|
||||
COLORS = {
|
||||
"air": (0, 191, 255),
|
||||
"grass": (34, 139, 34),
|
||||
"dirt": (139, 69, 19),
|
||||
"stone": (128, 128, 128),
|
||||
"sand": (238, 232, 170),
|
||||
"water": (0, 0, 255),
|
||||
"player": (255, 0, 0)
|
||||
}
|
||||
|
||||
# 游戏参数
|
||||
BLOCK_SIZE = 20
|
||||
GRAVITY = 0.5
|
||||
PLAYER_SPEED = 5
|
||||
JUMP_FORCE = -12
|
||||
Reference in New Issue
Block a user