Scratch for Java

Sprite::hitboxStateChanged()

Records the state getHitbox() derives its shape from, and reports whether any of it moved since the cached hitbox was built. Comparing the inputs rather than marking the cache dirty in every setter means a field that gets written directly, or a costume resized behind the sprite's back, cannot leave a stale hitbox behind.

Syntax

Java

.hitboxStateChanged()

Return

boolean

hitboxStateChanged()

Create Shareable URL

Select Sections