Sprite::ifOnEdgeBounce()
Checks if the sprite is on the edge of the stage and bounces it back if it is. The sprite's direction is reversed when it hits the left or right border, and it is reversed and rotated by 180 degrees when it hits the top or bottom border. The method does nothing if the hitbox is disabled or if the sprite is a UI element. It also does nothing if the sprite has not been added to a stage yet.
Examples
Syntax
Java
.ifOnEdgeBounce()
Scratch
if on edge, bounce
Return
void