当前位置:网站首页>How pyGame rotates pictures

How pyGame rotates pictures

2022-07-07 22:26:00 Happy learning Python

have access to pygame.transform.rotate( Image objects , Rotation Angle ) To achieve .

At first, I wrote the code by pressing the red box below , But the rocket was not rotated .

actually pygame.transform.rotate(Surface, Rotation Angle ) Is to return a rotated Surface, If the output is not this return Surface, You can't achieve the effect of rotation .

The adjusted code is as follows :

After running, I got the picture of the rotating rocket

 

 

原网站

版权声明
本文为[Happy learning Python]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202130606000394.html