So I was making a game in the Ursina engine and I made two of the same button:
class MainMenuButton(Button):
def __init__(self, pos, text):
super().__init__(
model = 'cube',
color = color.white,
position = pos,
rotation = (0, 90, 0),
scale = (7, 1, 1),
parent = scene,
text = text,
text_color = color.black,
text_origin = (0, 0, -0.6)
)
MainMenuButton = MainMenuButton((4.9, 4, 0), 'a')
MainMenuButton2 = MainMenuButton((4.9, 3, 0), 'b')
app.run()
When I launch the code without the last line, it works just fine. But when I pasted it back, it somehow doesn't work...? Any help?