end
This commit is contained in:
parent
ee4d769167
commit
ae83a87bc6
13
statek.py
13
statek.py
|
|
@ -223,6 +223,7 @@ def aktualizuj_karabiny():
|
|||
tekst_celu["text"] = "MISJA UKOŃCZONA! ZNISZCZYŁEŚ CELE!"
|
||||
tekst_celu["foreground"] = "gold"
|
||||
root.after(5000, lambda: tekst_celu.place_forget())
|
||||
root.after(7000, misja)
|
||||
|
||||
kamyki_do_usuniecia.sort(reverse=True)
|
||||
for idx in kamyki_do_usuniecia:
|
||||
|
|
@ -266,7 +267,6 @@ def aktualizuj_karabiny():
|
|||
|
||||
|
||||
def misja():
|
||||
print("X")
|
||||
global ktura_misja, cele, cele_zniszczone, cel_wymagany
|
||||
ktura_misja += 1
|
||||
tekst_celu.place(x=20, y=20)
|
||||
|
|
@ -274,7 +274,7 @@ def misja():
|
|||
cele = []
|
||||
cele_zniszczone = 0
|
||||
cel_wymagany = ktura_misja * 5
|
||||
|
||||
root.after(1000, lambda: tekst_celu.config(text=f"Cele do zniszczenia: {cele_zniszczone}/{cel_wymagany}"))
|
||||
for i in range(cel_wymagany):
|
||||
cx = randrange(200, 900)
|
||||
cy = randrange(200, 600)
|
||||
|
|
@ -406,9 +406,18 @@ def sprawdz_kolizje_czolgu():
|
|||
hpile["text"] = str(int(hp))
|
||||
x = 0
|
||||
tempomat = False
|
||||
if hp <= 0:
|
||||
end()
|
||||
break
|
||||
|
||||
|
||||
def end():
|
||||
grafika_misji = PhotoImage(file="GAME-OVER.png")
|
||||
c = Label(root, image=grafika_misji,bg="black")#darkolivegreen")
|
||||
c.place(relx=0.5, rely=0.5, x=-330)
|
||||
root.after(1000, exit)
|
||||
|
||||
|
||||
def gluwna():
|
||||
global x, tempomat, firerate, czekajmagazynek, pelny, magazynek, ladowanie, pzeladowanie
|
||||
|
||||
|
|
|
|||
23
testy.py
23
testy.py
|
|
@ -1,15 +1,14 @@
|
|||
from turtle import *
|
||||
import turtle as t
|
||||
import tkinter as tk
|
||||
from tkinter import font
|
||||
|
||||
root = tk.Tk()
|
||||
# Tworzymy okno z listą, żeby wygodnie przewijać czcionki
|
||||
listbox = tk.Listbox(root, width=50, height=20)
|
||||
listbox.pack(padx=10, pady=10)
|
||||
|
||||
def cc(c):
|
||||
if c <= 3:
|
||||
o = 0
|
||||
return
|
||||
fd(c)
|
||||
lt(30)
|
||||
cc(c / 2)
|
||||
# Sortujemy i dodajemy wszystkie dostępne nazwy czcionek
|
||||
for f in sorted(font.families()):
|
||||
listbox.insert(tk.END, f)
|
||||
print(f)
|
||||
|
||||
|
||||
cc(80)
|
||||
t.mainloop()
|
||||
root.mainloop()
|
||||
Loading…
Reference in a new issue