- Home /
Why does the Child Class Update() work but not the Parent Class Update()
I created a Parent Class named Structure which has a function called Build(). Build() checks every update when a structure is done building or not so it has to go to the Update(). I also have a Child Class named House which takes from Structure.
Problem: I wanna make it easier for myself so I wanted to run Build() from Structure (Parent Class) instead of running it from House (Child Class). Can someone explain to me how this works and if it is possible? Since, I have a Parent Class, I'm planning on having multiple other Child Classes like, Castle, Tower, Market, etc. which will also be using the Build() function and if possible, I don't want to have to put it on every single one of the child classes.
This is more of an advanced topic (in my opinion) and my coding skills are more on the Intermediate level.