From 1377f37b608b5715113e793c6984f7601211e99b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Mon, 17 Jun 2024 00:02:02 +0300 Subject: [PATCH] d --- v5/Window.py | 20 +++++++++++++++++++- v5/res | 1 + 2 files changed, 20 insertions(+), 1 deletion(-) create mode 120000 v5/res diff --git a/v5/Window.py b/v5/Window.py index 240bcab..5f8b479 100644 --- a/v5/Window.py +++ b/v5/Window.py @@ -2,8 +2,26 @@ import arcade class Window(arcade.Window): def __init__(self): - super().__init__(800, 600, "OGS Memory") + super().__init__(900, 600, "OGS Memory") arcade.set_background_color(arcade.color.WHITE) + self.all_sprites = arcade.SpriteList() + + # Animated begin button. + player = arcade.AnimatedTimeBasedSprite() + for i in range(2): + tex = arcade.load_texture("res/buttons_begin.png", x = i*350, y = 0, width = 350, height = 100) + player.append_texture(tex) + a = arcade.sprite.AnimationKeyframe(i, 700, tex) + player.frames.append(a) + player.center_x = 300 + player.center_y = 200 + + self.all_sprites.append(player) + def on_draw(self): arcade.start_render() arcade.draw_circle_filled(400, 300, 15, arcade.color.BLUE) + self.all_sprites.draw() + + def on_update(self, delta): + self.all_sprites.update_animation() diff --git a/v5/res b/v5/res new file mode 120000 index 0000000..85ee702 --- /dev/null +++ b/v5/res @@ -0,0 +1 @@ +../res \ No newline at end of file