python - Testing for Direction Pygame -
i'm trying learn how use pygame, i've created 1 basic game , couple of other tests. i've managed pull small bit of code bits on internet.
when run it, car points towards mouse; couldn't find on testing direction image pointing, or setting direction else. say:
def set_direction(image, angle): 'set direction of image' def direction(image): 'returns direction of image'
i'm not sure i'd if want point image somewhere.
sorry if duplicate, couldn't find else.
you have keep track of current angle of car manually (e.g. int). cannot make image return it's angle, doesn't have one.
to rotate image, have @ pygame.transform.rotate().
Comments
Post a Comment