Skip to content

Tag: class

Python Trigger a function when a function is called

So, I am making a desktop app with PyQt6. I have a stylesheet and I want it to update every time I add something to it. Stylesheet is an array and I have multiple functions adding things to it: Now, I want to update the stylesheet every time I call one of these functions (or a function in the class

I am having trouble with enemies in pygame

I have been trying to create an enemy class for my snake game that I can execute in my pygame loop, but my fill_screen() function keeps it so that either one enemy is on the screen at a time, or no enemies are on the screen. I hope someone can help me with this issue, because I have been working