UpdateItem¶
This is an update method that only applies to item entities. It only does anything if the sprite exists.
- The
spriteis disabled if theanimidis 3 (this is a Crystal Berry) - If the
animidis 0 or 1 (this is a standard or key item), thespriteis assigned to the correspondingitemsprite[0, x]where x is theitemstatewhich is the item id. - If the
animidis 2 (this is a medal), thespriteis assigned to the correspondingitemsprite[1, x]where x is theitemstatewhich is the medal id. There is an exception to this: if flag slot 681 is true (MYSTERY? is active),overridemovesmakeis false anditemstateisn't 59 (Extra Freeze), thespriteis assigned toguisprites[190]instead (the ? medal sprite)
After everything, if the sprite is enabled with a backing sprite, the local position of spritetransform is set to (0.0, the y extend of the sprite's sprite, 0.0).