猫史档案馆


僵还是老的辣

僵还是老的辣

Lv.1

没啥的

获赞:282收藏:158浏览:8125作品收藏:338

签名:没事出一堆水作

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

【Python作品分享】Hatefulball Pong 2.0【作品秀】 中回复

import pygame as p
import time as t
p.init()
s = p.display.set_mode([800,600])
p.display.set_caption("----- Smiley Pong 2.0 -----")
k = True
BLACK = (0,0,0)
WHITE = (255,255,255)
YELLOW = (255,255,0)
ix = 60
iy = 60
speedx = 1
speedy = 1
pw = 200
ph = 25
px = 300
py = 550
iw = 100
ih = 100
po = 0
l = 5
r = 50
o = 0
ti = 0.01
font = p.font.SysFont("Times",24)

while k:
    for event in p.event.get():
        if event.type == p.QUIT:
            k = False
        if event.type == p.KEYDOWN:
            if event.key == p.K_F1:
                po = 0
                l = 5
                ix = 60
                iy = 60
                speedx = 1
                speedy = 1

            if event.key == p.K_F2:
                ti = 0.01

    ix += speedx
    iy += speedy

    if ix <= 50 or ix >= 750:
        speedx = -speedx
    if iy <= 50:
        speedy = -speedy 
    if iy >= 550:
        l -= 1
        speedy = -1
        speedx = 1
        iy = 549

    s.fill(BLACK)
    p.draw.circle(s,YELLOW,(ix,iy),r)

    px = p.mouse.get_pos()[0]
    px -= pw/2
    p.draw.rect(s, WHITE, (px, py, pw, ph))
    ti -= 0.000001
    if ti > 0.001:
        t.sleep(ti)
    else:
        t.sleep(0.001)

    if iy + ih - 50 >= py and iy + ih - 50 <= py + ph and speedy > 0:
        if ix + iw/2 - 50 >= px and ix + iw/2 - 50 <= px + pw:
            speedy = -speedy
            po += 1
    
    draw_string = "Lives:" + str(l) + "  Points: " + str(po) + "  Press [F2] to turn the speed to 0.01.(Press [Fn] first)"
    if l < 1:
        speedx = 0
        speedy = 0
        draw_string = "...Game Over..." 
        draw_string += "Your score was: " + str(po)
        draw_string += ". Press [F1] to play again. "

    text = font.render((draw_string), True, WHITE)
    text_rect = text.get_rect()
    text_rect.centerx = s.get_rect().centerx
    text_rect.y = 10
    s.blit(text,text_rect)
    p.display.update()

p.quit()

2020-10-05T15:15:38 点赞:0

为什么打出…… 中回复

微 信

2020-10-08T11:01:35 点赞:0

【用一个四字词语形容你楼下的头像】(doge) 中回复

吔喵咧!!!!!!!!!!!!!!!!

2020-10-08T11:02:43 点赞:0

gb炮自绘画素材分享 中回复

照着这个头画GB,闭嘴,张嘴center_image

2020-10-11T14:02:44 点赞:0

我的抠图点 中回复

center_image把僵王抠出来

2020-10-17T10:57:15 点赞:0

肝--------horror sans 中回复

三邪骨的

2020-10-24T11:14:37 点赞:0

求sans的素材,我用pvz的交换 中回复

center_imagecenter_imagecenter_imagecenter_imagecenter_imagecenter_imagecenter_imagecenter_imagecenter_imagecenter_imagecenter_image

2020-10-24T11:26:58 点赞:0

求植物大战僵尸素材 中回复

center_image

2020-10-24T13:36:49 点赞:0

【跟风】用四个字形容你楼下的头像 中回复

俩人(凑字~)

2020-10-25T09:43:00 点赞:0

【kitten4.0反馈】遇到问题不要怕,技术喵来帮你忙! 中回复

按开始什么都没发生

2020-11-01T13:49:24 点赞:0

关于ULB是否劣质? 中回复

还算可以,本来一个挺好的同人,但是老版贴图有自己的风格啊,新版相反,虽然新版加入了催更,但使贴图变差了。center_image

2020-11-01T17:25:20 点赞:0

关于ULB是否劣质? 中回复

center_imagecenter_imagecenter_imagecenter_image

2020-11-01T17:25:56 点赞:0

【素材店铺】 GASTER UT/DR素材店铺开启啦 中回复

老G(ulb里的,要头和身体分开,要新版的ulb了的老G)

如下图:center_image

2020-11-01T17:28:18 点赞:0

【kitten4.0反馈】遇到问题不要怕,技术喵来帮你忙! 中回复

哪里导入sb3文件啊

2020-11-15T10:13:08 点赞:0

好无聊啊啊啊啊啊 中回复

center_image

偶也素很无聊啦~银类~

2020-11-15T11:23:41 点赞:0

如果你的头像和你要决斗,你会如何处理? 中回复

用 我 的center_image

砸喵他:center_image

2020-11-15T11:35:36 点赞:0

我也开店了!接输入法皮肤定制,素材定制,素材抠图,音乐素材定制 中回复

center_image麻烦了,去黑

2020-11-28T09:29:00 点赞:0

【kitten4.0反馈】遇到问题不要怕,技术喵来帮你忙! 中回复

怎么导出3.0和4.0的声音?用图片示范

2020-12-05T14:00:35 点赞:1

我要退猫了 中回复

退个屁!!!!!!

2020-12-06T14:52:13 点赞:0

【kitten4.0反馈】遇到问题不要怕,技术喵来帮你忙! 中回复

点开始不动。https://kitten4.codemao.cn/#70喵5867

2020-12-06T15:39:53 点赞:0

【社区功能反馈】用心倾听,用头发发电!(2026更新版) 中回复

center_image

嗯~有人回我了~

center_image

咦?明明有红点咋又没了?而且这些我全看过了啊

2020-12-26T18:36:47 点赞:0

让我康康猫站有多少人知道undertale和au? 中回复

sans和帕派瑞斯的曲子叫狂妄之人和骨头狂潮。sans的审判眼在我们的视角是右眼。决心鱼全名叫不灭的安黛因。mtt全名叫镁塔顿。ink!sans的au叫--tale。到底蓝莓是哥还是烟枪是弟。反转传说是frisk流石油。

2020-12-26T18:43:57 点赞:1

论室长和 y k s 夜 晚 的 星 星 的年龄和性别 中回复

░░░░░▄▄▀▀▀▀▀▀▀▀▀▄▄░░░░░
░░░░█░░░░░░░░░░░░░█░░░░
░░░░█░░░░░░░░░█░░░█░░░░
░░░░█░░░░░░░░█▄▄▄░░░█░░░
░░░░█░▄▄▄░░▄░████░░░░█░░░
░░░▄█░▄░░░▀▀▀░░░▄░░░░▄░░░
░░░█░░▀█▀█▀█▀█▀█▀░░█░░░
░░░▄██▄▄▀▀▀▀▀▀▀▄▄██▄░░░
░▄█░█▀▀█▀▀▀█▀▀▀█▀▀█░█▄░
▄▀░▄▄▀▄▄▀▀▀▄▀▀▀▄▄▀▄▄░▀▄
█░░░░▀▄░█▄░░░▄█░▄▀░░░░█
░▀▄▄░█░░█▄▄▄▄▄█░░█░▄▄▀░
░░░▀██▄▄███████▄▄██▀░░░
想来一个不好的汤姆吗?

2021-01-16T20:32:56 点赞:0