If we are talking about using function physicsUpdate() in update() function in a class, which extend Entity, then you can't call it before super.update(), because it update coords and etc.
So you have to call physicsUpdate() after. Thus this kind of condition appeared to check of object wasn't destroyed after super call. But actually this check is useless, cuz it takes properties of object, which, if destroyed in super call, will be null.
So have to make outer checks like that anyway:
super.update()
if not done
physicsUpdate(this)
Then it works fine. Or do you think it can be used somewhere else, not in update() function?
If we are talking about using function
physicsUpdate()
inupdate()
function in a class, which extend Entity, then you can't call it beforesuper.update()
, because it update coords and etc. So you have to callphysicsUpdate()
after. Thus this kind of condition appeared to check of object wasn't destroyed after super call. But actually this check is useless, cuz it takes properties of object, which, if destroyed in super call, will be null.So have to make outer checks like that anyway:
Then it works fine. Or do you think it can be used somewhere else, not in
update()
function?