mirror of
https://github.com/csd4ni3l/simulator-games.git
synced 2026-01-01 12:23:44 +01:00
Make a modular BaseGame class that all Games are based on to decrease bloat, add Diaunay simulation and fix some stuff in README
This commit is contained in:
@@ -82,6 +82,9 @@ class Main(arcade.gui.UIView):
|
||||
self.double_pendulum_simulator_button = self.box.add(arcade.gui.UITextureButton(text="Double Pendulum Simulator", texture=button_texture, texture_hovered=button_hovered_texture, width=self.window.width / 2, height=self.window.height / 16, style=big_button_style))
|
||||
self.double_pendulum_simulator_button.on_click = lambda event: self.double_pendulum_simulator()
|
||||
|
||||
self.delaunay_simulator_button = self.box.add(arcade.gui.UITextureButton(text="Delaunay Simulator", texture=button_texture, texture_hovered=button_hovered_texture, width=self.window.width / 2, height=self.window.height / 16, style=big_button_style))
|
||||
self.delaunay_simulator_button.on_click = lambda event: self.delaunay_simulator()
|
||||
|
||||
self.settings_button = self.box.add(arcade.gui.UITextureButton(text="Settings", texture=button_texture, texture_hovered=button_hovered_texture, width=self.window.width / 2, height=self.window.height / 16, style=big_button_style))
|
||||
self.settings_button.on_click = lambda event: self.settings()
|
||||
|
||||
@@ -125,6 +128,10 @@ class Main(arcade.gui.UIView):
|
||||
from game.double_pendulum_simulator.game import Game
|
||||
self.window.show_view(Game(self.pypresence_client))
|
||||
|
||||
def delaunay_simulator(self):
|
||||
from game.delaunay_simulator.game import Game
|
||||
self.window.show_view(Game(self.pypresence_client))
|
||||
|
||||
def settings(self):
|
||||
from menus.settings import Settings
|
||||
self.window.show_view(Settings(self.pypresence_client))
|
||||
|
||||
Reference in New Issue
Block a user