CancelAction¶
This is a method that can cancel any ongoing DoActionTap and DoActionHold. by cleaning up everything they were doing. There are 2 overloads available:
This one ends up calling the one below where keepbeerang is false
public void CancelAction()
This is the main overload where the cancellation logic is
public void CancelAction(bool keepbeerang)
Parameters¶
keepbeerang: If false, thebeemerangwill get destroyed if it exists (this is only called with true when colliding with a JumpSpring)
Procedure¶
movecdis reset to 0.0 so any existing movement's frame counter resets- If the player is
dashing, StopDash is called without wall - entity gets StopForceMove called
- The
tboxis destroyed if it exists - If the player is
digging,DigPop2sound plays at 0.7 volume flycooldownis reset to 240.0shieldis set to false- If the player is
flyingordigging:- The entity.
soundstops playing - TeleportFollowers is called
- If there are more than 1
playerdata, all of them gets the following adjustement on their entity:- LockRigid(false) called to unlock their
rigid overrideanimset to falseongroundset to false (forces an animation update)spinzeroed out- animstate set to 0 (
Idle)
- LockRigid(false) called to unlock their
- The entity.
diggingis set to falseflyingis set to falsestartdigis set to falsediggingpartis moved offscreen then destroyed in 1.0 secondstunnelpartis moved offscreen then destroyed in 1.0 secondslockkeysis set to false which unlocks most input processing- entity.
soundstops playing - entity.
overrideanimis reset to false - If the player isn't in a
submarine, entity.overrideflipis reset to false - entity.
overridejumpis reset to false - entity.
soundstops playing again startheightis reset to null- entity.
spinis zeroed out - entity.
rigid's gravity gets enabled - If
actionroutineis in progress, it is stopped - If the
beemerangexists and keebeerang is false, it is destroyed - If
tempcamoffsetisn't null (never happens under normal gameplay since this field is UNUSED), instance.camoffsetis set to the value - If
icecleexists:- A
Prefabs/Particles/IceShatterGameObject is instantiated rooted at theiceclewith -90.0 x angle, but destroyed in 2.0 seconds icecleis destroyed
- A
- entity.
soundstops looping tempcamoffsetis reset to null (it's not normally used)actionis set to falsepausecooldownis set to 10.0 so pausing isn't allowed for the next 10.0 frames- entity.
ongroundis set to false which forces an animation update - ActionCooldown is called which sets
actioncooldownto a value depending onlastactionid:- 1 (
Beetle): 5.0 frames - Any other values (
BeeorMoth): 17.0 frames
- 1 (