本文整理汇总了Python中car.Car.y方法的典型用法代码示例。如果您正苦于以下问题:Python Car.y方法的具体用法?Python Car.y怎么用?Python Car.y使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类car.Car
的用法示例。
在下文中一共展示了Car.y方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: complex
# 需要导入模块: from car import Car [as 别名]
# 或者: from car.Car import y [as 别名]
car.y = event.pos[1]
elif event.type == MOUSEBUTTONDOWN and event.button == 3:
carpos = complex(car.x, car.y)
mpos = complex(event.pos[0], event.pos[1])
car.orientation = phase(mpos - carpos)
else:
print event
radius = 300
point1 = (400,0)
point2 = (0, 400)
car_radius = 30
car = Car(0,0,0,0,0,0,0,0,0,0,0,0,0)
car.x = 420
car.y = 180
car.orientation = pi/2
outer_line = ((100,215),(230,100),(400,150),(560,105),(650,180),(685,270),(710,400),(615,500),(510,545),(355,540),(335,480),(255,490),(185,540),(125,521),(90,420))
inner_line = ((150,215),(230,150),(400,200),(540,155),(600,210),(625,275),(650,380),(600,440),(510,500),(380,480),(380,420),(260,430),(185,500),(150,480))
def runGUI():
pygame.display.set_mode((800,600))
pygame.display.set_caption("Neuro Junk 2012/13")
screen = pygame.display.get_surface()
while True:
input(pygame.event.get())
screen.fill((0,0,0))