mirror of
https://github.com/csd4ni3l/ember-keeper.git
synced 2026-01-01 04:23:43 +01:00
Initial commit from game template + some starting work
This commit is contained in:
30
game/play.py
Normal file
30
game/play.py
Normal file
@@ -0,0 +1,30 @@
|
||||
import arcade, arcade.gui
|
||||
|
||||
from utils.constants import button_style
|
||||
from utils.preload import button_texture, button_hovered_texture
|
||||
|
||||
class Game(arcade.gui.UIView):
|
||||
def __init__(self, pypresence_client):
|
||||
super().__init__()
|
||||
|
||||
self.pypresence_client = pypresence_client
|
||||
self.pypresence_client.update(state="Keeping the warmth")
|
||||
|
||||
self.anchor = self.add_widget(arcade.gui.UIAnchorLayout(size_hint=(1, 1)))
|
||||
self.warmth = 100
|
||||
|
||||
self.camera = arcade.Camera2D()
|
||||
self.spritelist = arcade.SpriteList()
|
||||
|
||||
def on_show_view(self):
|
||||
super().on_show_view()
|
||||
self.warmth_meter = self.anchor.add(arcade.gui.UISlider(value=100, max_value=100, min_value=0), anchor_x="center", anchor_y="bottom")
|
||||
|
||||
def on_update(self, delta_time):
|
||||
self.warmth_meter.value = self.warmth
|
||||
|
||||
def on_draw(self):
|
||||
super().on_draw()
|
||||
|
||||
with self.camera.activate():
|
||||
self.spritelist.draw()
|
||||
0
game/sprites.py
Normal file
0
game/sprites.py
Normal file
Reference in New Issue
Block a user