Upload code
This commit is contained in:
47
TextAdventure/Spiel Schiff.py
Executable file
47
TextAdventure/Spiel Schiff.py
Executable file
@@ -0,0 +1,47 @@
|
||||
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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user