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["text"] = "MISJA UKOŃCZONA! ZNISZCZYŁEŚ CELE!"
|
||||||
tekst_celu["foreground"] = "gold"
|
tekst_celu["foreground"] = "gold"
|
||||||
root.after(5000, lambda: tekst_celu.place_forget())
|
root.after(5000, lambda: tekst_celu.place_forget())
|
||||||
|
root.after(7000, misja)
|
||||||
|
|
||||||
kamyki_do_usuniecia.sort(reverse=True)
|
kamyki_do_usuniecia.sort(reverse=True)
|
||||||
for idx in kamyki_do_usuniecia:
|
for idx in kamyki_do_usuniecia:
|
||||||
|
|
@ -266,7 +267,6 @@ def aktualizuj_karabiny():
|
||||||
|
|
||||||
|
|
||||||
def misja():
|
def misja():
|
||||||
print("X")
|
|
||||||
global ktura_misja, cele, cele_zniszczone, cel_wymagany
|
global ktura_misja, cele, cele_zniszczone, cel_wymagany
|
||||||
ktura_misja += 1
|
ktura_misja += 1
|
||||||
tekst_celu.place(x=20, y=20)
|
tekst_celu.place(x=20, y=20)
|
||||||
|
|
@ -274,7 +274,7 @@ def misja():
|
||||||
cele = []
|
cele = []
|
||||||
cele_zniszczone = 0
|
cele_zniszczone = 0
|
||||||
cel_wymagany = ktura_misja * 5
|
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):
|
for i in range(cel_wymagany):
|
||||||
cx = randrange(200, 900)
|
cx = randrange(200, 900)
|
||||||
cy = randrange(200, 600)
|
cy = randrange(200, 600)
|
||||||
|
|
@ -406,9 +406,18 @@ def sprawdz_kolizje_czolgu():
|
||||||
hpile["text"] = str(int(hp))
|
hpile["text"] = str(int(hp))
|
||||||
x = 0
|
x = 0
|
||||||
tempomat = False
|
tempomat = False
|
||||||
|
if hp <= 0:
|
||||||
|
end()
|
||||||
break
|
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():
|
def gluwna():
|
||||||
global x, tempomat, firerate, czekajmagazynek, pelny, magazynek, ladowanie, pzeladowanie
|
global x, tempomat, firerate, czekajmagazynek, pelny, magazynek, ladowanie, pzeladowanie
|
||||||
|
|
||||||
|
|
|
||||||
23
testy.py
23
testy.py
|
|
@ -1,15 +1,14 @@
|
||||||
from turtle import *
|
import tkinter as tk
|
||||||
import turtle as t
|
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):
|
# Sortujemy i dodajemy wszystkie dostępne nazwy czcionek
|
||||||
if c <= 3:
|
for f in sorted(font.families()):
|
||||||
o = 0
|
listbox.insert(tk.END, f)
|
||||||
return
|
print(f)
|
||||||
fd(c)
|
|
||||||
lt(30)
|
|
||||||
cc(c / 2)
|
|
||||||
|
|
||||||
|
root.mainloop()
|
||||||
cc(80)
|
|
||||||
t.mainloop()
|
|
||||||
Loading…
Reference in a new issue