I don’t really understand this whole dependency setup. Instead of having several scripts all calling Health.IsDead every frame, would it not be easier if they all just ran until Health told them to stop? I know the game’s performance is probably barely even affected by these simple methods, but would it not be easier on principle? Would that be the same as making Health dependant on all the other scripts?
1 Like
We will be including an OnDeath event at a later point in this course, but anything that happens within an Update() loop will still need to check to make sure that the character isn’t dead.
This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.