下面是部分代码预览:
"""
大鱼吃小鱼简易版.py
作者曾于几年前编写过本程序,这个版本是全新制作的。
日期2019年6月11日,本程序导入了Bigfish类和fish类。
在播放背景音乐的同时,用鼠标去操作大鱼吃小鱼。
如果要让大鱼吃了一条小鱼后长大,那么可以用pillow模块
或者pygame模块的图像处理功能让图像增大,再设为它的形状即可。
fish模块和bigfish模块在下面。
"""
import pygame
from fish import * # 导入小鱼类
from bigfish import * # 导入大鱼类
width,height = 480,360
chomp = pygame.mixer.Sound("chomp.wav")
pygame.mixer.init()
pygame.mixer.music.load("InonZur-海洋.wav")
pygame.mixer.music.play(-1,0)
screen = Screen()
screen,setup(480,360)
screen.title("大鱼吃小鱼_海龟画图版 www.lixingqiu.com")
screen.bgpic("背景2.png")
screen.delay(0)
screen.addshape("bigleft.gif")
screen.addshape("bigright.gif")
red_fish = Bigfish("bigright.gif","bigleft.gif")
screen.addshape("fish1.gif")
screen.addshape("fish2.gif")
for i in range(10):
Fish("fish1.gif","fish2.gif",(50,39),red_fish,chomp)
screen.mainloop()
下载完整源代码与素材,请扫码付款。
VIP免费查看
当前隐藏内容需要支付
69元
已有3人支付
立即购买