Commit ff5e871c by BellCodeEditor

save project

parent a9805961
...@@ -19,12 +19,12 @@ class log: ...@@ -19,12 +19,12 @@ class log:
def seet_log(self, key): def seet_log(self, key):
return self.log[key] return self.log[key]
def all_log(self, sep): def all_logvul(self, sep=","):
return_log = "" return_r = ""
for i in self.log: for i in self.log:
return_log = return_log + i return_r = return_r + i
return_log = return_log + sep return_r = return_r + sep
return return_log return return_r[0:len(return_r)-len(sep)]
if __name__ == "__main__": if __name__ == "__main__":
print('log 1.0.0\nHello from the log community.') print('log 1.0.0\nHello from the log community.')
\ No newline at end of file
...@@ -13,10 +13,11 @@ win_log.att_log("窗口创建","成功") ...@@ -13,10 +13,11 @@ win_log.att_log("窗口创建","成功")
bg = pg.image.load("bg.png") bg = pg.image.load("bg.png")
right = pg.image.load("right.png") right = pg.image.load("right.png")
body1 = pg.image.load("body.png")
food = pg.image.load("apple.png") food = pg.image.load("apple.png")
win_log.att_log("素材创建","成功") win_log.att_log("素材创建","成功")
print(win_log.all_log(",")) print(win_log.all_logvul())
while True: while True:
for event in pg.event.get(): for event in pg.event.get():
...@@ -24,4 +25,6 @@ while True: ...@@ -24,4 +25,6 @@ while True:
exit() exit()
win.blit(bg, (0,0)) win.blit(bg, (0,0))
win.blit(right, (290,120)) win.blit(right, (290,120))
win.blit(body1, (260,120))
win.blit(food, (360,300)) win.blit(food, (360,300))
pg.display.update()
\ 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