腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
1
回答
Pygame
问题
Rect
python
、
pygame
我是一个新的
pygame
用户,我有一个
问题
。我想用
pygame
.
Rect
移动一个图像,但它不工作。我和Tim一起从Tech学习
pygame
。下面是完整的代码。import
pygame
run = Trueimage =
pygame
.transf
浏览 15
提问于2021-11-08
得票数 1
1
回答
如何在游戏中画一个椭圆形?
python
、
pygame
我知道如何使用
pygame
.draw.circle()在游戏中画一个圆圈,但是如何在游戏中画一个椭圆呢?
浏览 7
提问于2022-08-27
得票数 0
回答已采纳
1
回答
TypeError:参数必须是
rect
样式对象
python
、
pygame
File "C:\Users\terry\Thonny\Computer Science\Final Snake.py", line 134, in <module> TypeError: Argument must be
rect
style
浏览 0
提问于2020-01-17
得票数 3
4
回答
如何在
pygame
中编写一个函数来绘制一个或多个对象?
python
、
pygame
我在python和
pygame
上都是一个相对新手。我正在尝试学习一个可视化计算器项目。在其中,我画了一个矩形,效果很好:但如果我执行以下操作:def draw_
rect
():
pygame
.draw.
rect
(screen, COLOR3,
Rect
=
py
浏览 0
提问于2021-06-17
得票数 0
1
回答
Pygame
Sprite未立即更新
python
、
python-3.x
、
debugging
、
pygame
太空入侵者游戏使用的是类,这是主类:import
pygame
, sysimport invader ###################width = 800fps = 30DISPLAY =
pygame
.display.set_mode((width,hei
浏览 3
提问于2017-01-30
得票数 0
回答已采纳
1
回答
在
PyGame
中更改矩形颜色
python
、
pygame
问题
是要么矩形没有出现,要么控制台给了我一个错误:有
问题
的代码如下:mouseButtons =
pygame
.mouse.get_pos() if (mouseButton
浏览 0
提问于2020-09-20
得票数 4
1
回答
碰撞随机检测和终止程序
python
、
pygame
、
collision
但我的碰撞似乎有个
问题
。我已经对它进行了编码,这样当检测到玩家和障碍物之间的碰撞时,它就会终止程序。但我现在面临的
问题
是,当程序运行时,播放器处于两个障碍物之间,甚至不关闭程序就会自杀。Obstacle_colour = (0,200,10)Obstacle_x = 500
pygame
.draw.
rect
Obstacle_x, 0, Obstacle_Width, height)) bottom
浏览 20
提问于2021-10-19
得票数 0
1
回答
创建线条动画的其他方法
python
、
pygame
() screen =
pygame
.display.set_mode((SCREEN_WIDTH, SCREEN_WIDTH)():
pygame
.quit() if event.type ==
pygame
.KEYDOWN:
浏览 2
提问于2021-09-19
得票数 0
1
回答
比目鱼三角洲时间导致不一致的运动
python
、
pygame
))
rect
2 =
pygame
.
Rect
(1180,500,100,100('white')
rect
2.x -= speed * dt
pygame
.draw.
rect
(scre
浏览 6
提问于2022-03-03
得票数 1
回答已采纳
2
回答
使用
pygame
在Python中的鼠标位置上绘制矩形
python
、
pygame
game_over = False print(event) game_over = True
浏览 0
提问于2021-05-31
得票数 1
回答已采纳
2
回答
检测我的鼠标何时在2个矩形上并选择操作
python
、
pygame
、
collision-detection
import
pygame
def __init__(self, screen,
rect
, x, y, color=
rect
self.x, self.y = x, y self.r =
pygame
.Surface((self.
rect
[2], self.
rect
[3]),
pyga
浏览 21
提问于2021-08-04
得票数 1
1
回答
如何编写一个
pygame
函数来绘制...2
python
、
pygame
我写了一个简短的脚本来说明我的
问题
: import
pygame
WIDTH = 525COLOR2(img, (150, 685))
pygame
.draw.
rect
(screen, COLOR2,
Rect
=
pygame
.
Rect<
浏览 27
提问于2021-06-18
得票数 1
1
回答
为什么穆广场不停留在我制造的障碍上?
python
、
pygame
import
pygame
screen.fill((255,255,255))20,40,200)x=200w=60p=0vel=0.1def player():
pygame
.draw.
rect
(screen,blue,
pygame
.
Rect
(p+x,
浏览 4
提问于2022-11-20
得票数 0
1
回答
pygame
的点击检测
问题
python
、
pygame
、
tic-tac-toe
(screen, smallBoxColor,
pygame
.
Rect
(30, 30, 60, 60))
pygame
.draw.
rect
(screen, smallBoxColor,
pygame
.
Rect
(30, 215, 60
pygam
浏览 18
提问于2021-11-09
得票数 0
1
回答
如何停止绘制特定的矩形游戏
python
、
python-3.x
、
pygame
我的
问题
是,虽然矩形一开始是按预期绘制和工作的,但它们似乎没有更新,因此顶部永远停止。换句话说,歌曲中的每一个音符都是无限长的。 self.coords[1][1]+=2 self.drawing = False
pygame
.display.update() 这一行在which循环中,它每
浏览 3
提问于2017-10-27
得票数 2
回答已采纳
1
回答
热对策矩形绘制
问题
python
、
python-3.x
、
pygame
请告诉我们抽签命令有什么
问题
。while True: for b in range(0, width + 1): for c in range(0, height + 1):
pygame
.draw.
rect
(screen, white,
浏览 0
提问于2019-02-23
得票数 0
回答已采纳
1
回答
我的纹理渲染功能有什么
问题
,如何解决?
python
、
pygame
以下是功能: last_texture_x, last_texture_y =
rect
[2],
rect
[3]for texture_count_y in range(0,int(
rect
[3]/texture.get_height())+1):
浏览 3
提问于2021-09-21
得票数 1
回答已采纳
3
回答
Pygame
:当用户单击某个区域时,如何显示一个新框;当用户再次单击时,如何关闭该框
python
、
pygame
问题
是,当鼠标移动时,新的while循环就会中断。它看起来也像第一个条件,检查用户是否正在单击按钮,在每次迭代中返回true,直到鼠标被移动。为什么这不只是一次还真呢?import
pygame
from
pygame
.locals import *RED =
rect
=
Rect
(50, 20, 200, 80)
rect
2 =
Re
浏览 11
提问于2022-01-08
得票数 1
回答已采纳
1
回答
我应该在哪里插入集合标题?
python
、
pygame
是因为我需要在另一个地方写它,还是其他类型的
问题
?')clock =
pygame
.time.Clock() player_speed = 5 def move(
rect
, x, y):
rect</
浏览 6
提问于2021-04-11
得票数 3
回答已采纳
1
回答
游戏点击时不绘制矩形
python
、
pygame
、
rect
= (255, 204, 203)
pygame
.draw.
rect
(screen, line_color, (390, 10, 10, 580))
pygame
.draw.
rect
(screen, line_col
浏览 2
提问于2021-01-25
得票数 1
回答已采纳
点击加载更多
相关
资讯
Pygame,游戏开发的欢乐天地!
如果Python基础够扎实了,不妨挑战一下二十分钟开发一款游戏!
利用Python实现敲击木鱼积累功德效果 功德+N
Python3练习项目19:使用python制作游戏(上)
外星人入侵,使用python开发的2D游戏
热门
标签
更多标签
云服务器
对象存储
ICP备案
云点播
智聆口语评测
活动推荐
运营活动
广告
关闭
领券