Isn’t it a better idea to search for an object of type player? instead of checking for null?
Checking for null isn’t that expensive here. Certain times it might be when minimal code is best such as looping 100,000 times, but its not really going to do much here.
Either way, if a null is possible then need to check it anyway so a crash doesn’t happen or need to make sure a null can’t be possible. Both require code. Necessary evil
2 Likes
As lector says in video - in future here may be situations when player dead and hasn’t any pawns, while ticking the timer before player respawn as my example, or better - is in gameover state.