Add 100% accuracy test and add controller support for the game only(not ui)

This commit is contained in:
csd4ni3l
2025-06-25 15:43:58 +02:00
parent 33877059e0
commit a7f5b94ae8
6 changed files with 112 additions and 47 deletions

View File

@@ -11,16 +11,16 @@ class GameModeSelector:
self.main = Entity(parent=camera.ui, model='cube', color=color.dark_gray, scale=(1.8, 1.2), z=1)
self.back_button = Button('Back', parent=camera.ui, color=color.gray, scale=(.1, .05), position=(-.8, .45), on_click=self.exit)
self.title_label = Text(text="Select a mode to play.", position=(-0.4, 0.35), scale=3)
self.title_label = Text(text="Select a mode to play.", position=(-0.4, 0.425), scale=3)
self.ui = [self.main, self.back_button, self.title_label]
y = 0.1
y = 0.2
for game_mode in game_modes:
button = Button(text=game_mode, scale_x=1, scale_y=0.2, text_size=2, position=(0, y), on_click=lambda game_mode=game_mode: self.play(game_mode))
button = Button(text=game_mode, scale_x=1, scale_y=0.15, text_size=2, position=(0, y), on_click=lambda game_mode=game_mode: self.play(game_mode))
self.ui.append(button)
y -= 0.21
y -= 0.16
def play(self, game_mode):
self.hide()