StopForceBehavior¶
This is a public method that aims to cleanly stop all forced behaviors or a behavior that uses a coroutine. Nothing happens if it's a dummy
.
forcebehavior
is set to nullbehaviorroutine
is stopped then set to null- If we aren't
inevent
, StopForceMove is called on the entity - entity.
overrideonlyflip
is set to false if it was true attacking
is set to false- If it's an Enemy and we aren't
inevent
, the entity.sprite
angles are set to (0.0, the y FlipAngle of the entity, 0.0)