Update¶
This is the Update of EntityControl. It doesn't do as much as LateUpdate
- Check if the entity should receive updates which only happens when unpaused, minipause isn't active, the message lock is released and the entity isn't dead. This can be overriden with activeonpause- Follow the standard animation speed update logic unless overrideanimspeedis true which will set the animation speed to 1.0 if there's noicecubeand to 0.0 if there is one on top of forcing the animstate toHurt
- Make sure the spriteis disabled if this is the player entity and is a submarine, otherwise- Toggle the sprite being enabled if the icooldownhasn't expired yet and the player is free (meaning it is present, no minipause or pause, not in an event, the message lock is released, and the player isn't digging)
- Ensure the sprite is enabled if it's not an item and it has no npcdataor it has one and it doesn't have adisguiseobj
- Ensure the child of the sprite are enabled or disabled according to the main sprite's enabled unless the npcdatais present and itstrappedis true
 
- Toggle the sprite being enabled if the 
- Decrease the icooldownwith the framestep
- Handle the restore of the entity when unpausing happend:- The rigid's useGravity is set tolastgravity
- The sound's volume is set tolastvolume
- The rigid's velocity is set tolastvelocity
- lastvelocityand- pauseposare put back to null
 
- The 
 
- Follow the standard animation speed update logic unless 
- Handle pausing updates, if we are paused- Unless lastvelocityalready had a value (which means this is the first frame of being paused) the pause states are saved- pauseposis set to the- transform's position
- lastgravityis set to the- rigid's useGravity
- lastvolumeis set to- sound's volume
- lastvelocityis set to the- rigid's velocity
- gravity is disabled on the rigid
- The soundis muted
- The rigid's velocity is zeroed
 
- If not in a battle, ensure the animation speed is set to 0.0 and then call StopMoving with the current animstate which will zero the rigid's velocity and thedeltavelocity. Otherwise, ensure the animation speed is 1.0
 
- Unless