I have a general enemy class (parent), and a enemy type (child). The parent class has a ready function which calls some functions, and the child's _ready function initializes some variables, and calls the parents _ready function. Here's a example code
I was expecting the output as:
But what I get is:
Even when I don't call the parents _ready from child I still get:
Where I think I should be getting child only. As I am overriding the parents _ready()
I need to call the parents _ready after childs _ready() is called only once But somehow parent's _ready gets called before childs even if I override it.
I tried printing objects that are calling the _ready() by
print("parent:"+str(self)) and print("parent:"+str(self))
Then I see that the functions are called by the same object.
Heres the output
Thank you for reading the question.
It will be really helpful if you could explain what I am doing wrong and what I should be doing.