Commit 1acbb3b4 by BellCodeEditor

save project

parent 1281c425
Showing with 5 additions and 3 deletions
import pygame
from pygame import locals,display,init
from pygame import event as _event
from pygame.key import get_pressed
from pygame.time import Clock as TIME
from pygame.image import load
from pygame.sprite import Sprite,Group,collide_rect
......@@ -55,6 +56,7 @@ time = 0
block_list = Group()
game_state = True
keys = get_pressed()
while True:
for event in _event.get():
......@@ -63,9 +65,8 @@ while True:
exit()
if event.type == locals.KEYDOWN:
if jumpState == "runing":
if event.key == locals.K_SPACE:
if event.key:
jumpState = "up"
# 悟空造型
wukong = Player(hero[index])
if jumpState == "runing": # 跑步状态下
......@@ -117,5 +118,5 @@ while True:
game_state = False
# 刷新画面
display.update()
TIME().tick(55)
TIME().tick(60)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment