- 在plane_sprites新建Hero类
- 重写初始化方法,直接指定图片名称,并且初始速度设置为0
- 设置英雄的初始位置
pygame.Rect |
x,y, left,top,bottom,right, center,centerx,centery, size,width,height |
- centerx = x+0.5*width
- centery= y+0.5*height
- bottom= y+height
pygame.Rect |
x,y, left,top,bottom,right, center,centerx,centery, size,width,height |