#移动方向
MOVE_STAND = 0
MOVE_UP = 1
MOVE_DOWN = 2
MOVE_LEFT = 3
MOVE_RIGHT = 4
#颜色
COLOR_WHITE = (255, 255, 255)
COLOR_GREEN = (0, 255, 0)
COLOR_RED = (255, 0, 0)
COLOR_BLUE = (0, 0, 255)
#场景状态
# 开始菜单
RUN_STATE_MENU = 0
# 游戏画面
RUN_STATE_RUN = 1
# 游戏结束
RUN_STATE_OVER = 2
#记录按下的方向键次数,松开时递减,当变成0的时候设置人物站立
keydownnum = 0
#上次生成的怪物数量:自动累加
lastmakemonstersnum = 1
#等待生成怪物倒计时秒值
waitmakedelay = 5
#生成怪物倒计时起点
startmaketime = 0
#生成怪物开始
startmake = False
#当前的关卡序号;决定背景图等
gatenum = 0
#运行场景状态
runstate = 0
#菜单类
menus = None
#玩家类
player = None
#怪物
monsters = []
#战斗类
fire = None
本游戏的完整代码和资源下载