猫史档案馆


poTATo

poTATo

Lv.1

我说我在js病院是在蹭空调你信吗

获赞:684收藏:215浏览:7064作品收藏:32

签名:沉迷于编程,等待变成高手

回复帖子评论
上一页5 页 / 共 5下一页

【小游戏】把你最近ctrl+c的东西发出来 中回复

n = int(input())
print(int((n**3+5*n)/6+1))

2023-07-27T15:07:22 点赞:0

如何在Python里搞舞台区 中回复

你可以试试pgzrun

import pgzrun
bg = Actor('图片.png')
def draw():
    bg.draw()
pgzrun.go()

2023-08-03T17:25:29 点赞:0

有没有大佬可以给点FNF素材 中回复

center_image

2023-08-06T12:18:07 点赞:0

https://kitten4.codemao.cn/?invite_code=YDX99H 邀 中回复

扫雷?我的py文件就是,喵QQ或尽快发链接

2023-08-06T12:21:58 点赞:0

紧急求助;如何制作将鼠标放到按钮上,按钮放大一点加有点泛白。 中回复

用这个:

center_image

2023-08-07T09:15:04 点赞:0

猫站最臭的训练师! 中回复

首 

2023-08-07T09:22:50 点赞:0

情景猜测【游戏】 中回复

是人为的吗

2023-08-08T10:15:31 点赞:0

谁学过c/c++ 中回复

初学C++

2023-08-08T10:17:59 点赞:0

【求助】https://kitten4.codemao.cn/?invite_code=6JCBKR 中回复

是啥东西

2023-08-08T10:32:32 点赞:0

有谁要加入我吗? 中回复

。_°

2023-08-12T10:58:11 点赞:0

玩个小游戏 中回复

小科羯元鉴

2023-08-12T11:22:53 点赞:0

大佬们求素材 中回复

RPG?具体是什么剧情

2023-08-12T11:23:41 点赞:0

如何奖变量数字改成自己做的数字 中回复

center_image

我这里用的是黑框数字,间距为120,其他看情况

center_image

结果如下:

center_image

 

 

 

 

 

 

 

 

 

 

 

 

 

要清空就用清除画笔即可

2023-08-12T12:01:34 点赞:1

如何在Python里搞舞台区 中回复

import pgzrun
bg = Actor("青青平原.gif")#要加上后缀名
codemao = Actor("马里喵1.gif",[114,514])#[]内为角色初始坐标
def draw():
    bg.draw()
    codemao.draw()

def move_x(num):
    codemao.x += num

move_x(114)
pgzrun.go()


2023-08-14T10:23:19 点赞:0

如何在Python里搞舞台区 中回复

center_image

 

center_image

 

center_image

 

center_image

center_imagecenter_image

center_imagecenter_imagecenter_image

2023-08-17T20:46:42 点赞:0

如何在Python里搞舞台区 中回复

importpgzrun,time,random#导入库 wt=time.time() die=0 score=0 WIDTH=800 HEIGHT=800 #一系列变量 bg=Actor("bg.gif") holes=[] foriinrange(6): hole=Actor("hole.png",[120+i%3*250,300+i//3*250+i%3*40]) hole.wait=random.randint(2,10) holes.append(hole) hammer=Actor("hammer1.png") lost=Actor("失败.png",[-114514,400]) #角色制作 defdraw(): globalscore bg.draw() forholeinholes: hole.draw() hammer.draw() lost.draw() screen.draw.text('分数:'+str(score),[0,0],fontsize=50,color="red") #角色显示 defupdate():#重复执行 globalwt,die,score#全局变量 ifdie==1:#侦测喵 lost.x=400 music.play_once("溜走.mp3") die=2#确保只执行一次 iftime.time()-wt>=1anddie==0:#没有死且每次间隔1秒 forholeinholes:#遍历 ifhole.wait==0:#到达交换时间 ifhole.image!="hole.png"orhole.image[4:11]=="touched":#侦测是否不为空 hole.image="hole.png" hole.y+=65#角色的《特性》 hole.wait=random.randint(2,10)#刷新时间 else: hole.image=random.choice(["飞电鼠","编程猫"])+"-happy.png" hole.y-=65 hole.wait=3 music.play_once("跳.mp3") else: hole.wait-=1 wt=time.time() hammer.image="hammer1.png"#确保点击后锤子恢复 defon_mouse_down(pos):#当鼠标点击 globaldie,score#全局 ifdie==0:#还没喵 hammer.image="hammer2.png" forholeinholes: ifhole.image!="hole.png"andhole.image[4:11]!="touched": music.play_once("咚.mp3") ifhole.collidepoint(pos): ifhole.image=="编程猫-happy.png":#侦测是否打了编程猫 die=1 else: score+=1 hole.image=hole.image[:3]+"-touched.png" hole.wait=1 defon_mouse_move(pos):#锤子跟随 globaldie ifdie==0: hammer.x=pos[0] hammer.y=pos[1] pgzrun.go()

2023-08-17T20:49:11 点赞:0