I'm currently programming a game in python. I have a main class (engine.py), and many subclasses. The main class has some important variables like the player. When I now am in a subclass, and want to access another variable or function, it often looks like this:
self.handleToEngine.player.playerObj.animationHandler.doSomething()
Is there a way to shorten this? I don't believe the performance is that good, and it's no clean code.