I have this class for my game that is a scene manager. I followed a tutorial and I am confused on why the self.scene.manager is equal to self
class SceneManager(object): def __init__(self): self.go_to(TitleScene()) def go_to(self, scene): self.scene = scene self.scene.manager = self #<--
In the main game scene I also have a similar thing happening
class GameScene(Scene): def __init__(self, levelno): super(GameScene, self).__init__() self.player = Player(5, 40) self.player.scene = self
What is the purpose of setting it to self?
Another Question: I have been using classes and for most of them I create a class and I include this within the class
Class myClass(): super(myClass, self).__init__() #<----- This line here
Does this have something to do with my original question? What is the purpose of doing this?