inf-kswo/TextAdventure/Spiel Schiff.py
2025-01-20 19:41:45 +01:00

48 lines
677 B
Python
Executable File

import turtle
#import math
import time
screen = turtle.Screen()
screen.setup(1280,720)
turtle.speed(0)
s1_t = turtle.Turtle()
s1_main = turtle.Turtle()
mouseaim = turtle.Turtle()
s1_t.ht()
s1_main.ht()
mouseaim.pu()
mouseaim.speed(0)
#turtle.tracer(0)
def turret():
screen.clear()
s1_t.dot(15)
s1_t.width(3)
s1_t.fd(20)
screen.update()
s1_t.home()
screen.onscreenclick(goto_loc,1)
def body():
print("ok")
def ship():
print("ok")
def goto_loc(x, y):
mouseaim.goto(x, y)
s1_t.setheading(s1_t.towards(x, y))
turret()
screen.onscreenclick(goto_loc,1)