Code: Alles auswählen
def schiff_beweg(event):
if event.keysym == 'Up':
c.move(schiff_id, 0,-SCHIFF_GESCHW)
c.move(schiff_id2, 0,-SCHIFF_GESCHW)
elif event.keysym == 'Down':
c.move(schiff_id, 0,SCHIFF_GESCHW)
c.move(schiff_id2, 0,SCHIFF_GESCHW)
elif event.keysym == 'Left':
c.move(schiff_id,-SCHIFF_GESCHW, 0)
c.move(schiff_id2,-SCHIFF_GESCHW, 0)
elif event.keysym == 'Right':
c.move(schiff_id,SCHIFF_GESCHW, 0)
c.move(schiff_id2,SCHIFF_GESCHW, 0)
c.bind_all('<Key>', schiff_beweg)
Hat jemand vielleicht Ahnung wie man das schreiben könnte?
Vielen Dank.