Commit 17edc4f6 by BellCodeEditor

auto save

parent 7fe7ad33
Showing with 6 additions and 8 deletions
import pygame
x'x'x'x'x'xxxxxxximport pygame
from pygame import locals
import random
pygame.init() # 初始化
class Block(pygame,sprite,Sprite):
def_init_(self,imaga1,imaga2,imaga3):
supere()._init_()
supere()._init_()s's's's's's's's's's's's's's's's's's's
self.image = random.choice([image1,image2,image3])
self.rect = self.imef.image.get_rect()
self.rect.x= 1000
self.rect.y =500 - self.rect.height
self.rect.y =500 - self.rect.heightssssssssssssssssssssssss's's's's's's's's's's's's's's's's's's
class Player(pygame,sprite,Sprite):
def_init_(self,image):
super()._init_()
super()._init_()ssss's's's's's's's's's's's's's's's's'ssss's's'ssssss's's's's's's's's's'ssssss's's's's's's'ss's's's's's's's's's's's's's's's's's's's's's's's'ssssssssssssssssssssssssssssssss's's's's's's's's's's's's's's's's's'ssssss
self.image = image
self.rect = self.imef.image.get_rect()
self.rect.x = 150
self.rect.y = 400
self.rect = self.imef.image.get_rec.x = 150sssssssssssssssssssssss
def (self, parameter_list):
raise NotImplementedError
......@@ -92,7 +90,7 @@ while True:
# 创建障碍物对象
time += 1
if time >= 60:
r=randon.randint(0,100)
r=randon.randint(0,100)x'x'x'x'x'xxxxxxx
if r>40:
obstacle = Block(bush,cacti,stome)
block_list.add(obstacle)
......
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