diff --git a/main.py b/main.py index e3e0b06..abdfd86 100644 --- a/main.py +++ b/main.py @@ -19,9 +19,10 @@ image_center = ImageTk.PhotoImage(Image.open('res/logo/main.png')) time = None delta = None iter = 0 +score = tk.IntVar(win, 0) def loop(deltaTime): - global time, delta, iter + global time, delta, iter, score # Start delta = dt.datetime.now() @@ -33,8 +34,9 @@ def loop(deltaTime): osu.loop(deltatime) pong.loop(deltatime) space.loop(deltatime) - else: - iter += 1 + + score.set(int(iter / 5)) + iter += 1 # End time = delta @@ -57,6 +59,9 @@ def main(): win.iconbitmap('res/logo/main.ico') tk.Label(win, image = image_center, bg = color.LEVEL_1).place(x = 401 - 32, y = 301 - 32) + # Score + tk.Label(win, textvariable = score, bg = color.LEVEL_1, fg = color.BROWN, font = (None, 12)).place(x = 2, y = 2) + # Ini fall.main(canvas_fall) osu.main(canvas_osu)