You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Items, like health potions and swords and such, are currently kind of boring: they just sit on the ground. Lame. What instead they should do is what the Coins and Gems do: bob up and down in the air. But it'd be best to not have to embed a bobbing animation in each ThangType we intend to use with the inventory.Collectable Component.
Instead we should do something like what the WizardSprite does and make the bobbing happen automatically in the updatePosition method of any CocoSprite with thang.isCollectable == true.
Once that started working, we could remove the built-in bobbing animation from Coin and Gem, too.
After that's working, we'd probably want to not tie bobbing to the inventory.Collectable Component, but instead to make a new Component: display.Bobs or something like that. That would be nice, because then we could attach it to any flying Thangs, and we could remove the special-case code from the WizardSprite, too. All that display.Bobs would need to do is attach a bobs or maybe bobsUpAndDown property to the Thang, and the CocoSprite would read that instead of isCollectable. If we really wanted, we could configure the bob distance in that Component.
The text was updated successfully, but these errors were encountered:
Items, like health potions and swords and such, are currently kind of boring: they just sit on the ground. Lame. What instead they should do is what the Coins and Gems do: bob up and down in the air. But it'd be best to not have to embed a bobbing animation in each ThangType we intend to use with the
inventory.Collectable
Component.Instead we should do something like what the WizardSprite does and make the bobbing happen automatically in the
updatePosition
method of any CocoSprite withthang.isCollectable == true
.Once that started working, we could remove the built-in bobbing animation from Coin and Gem, too.
After that's working, we'd probably want to not tie bobbing to the
inventory.Collectable
Component, but instead to make a new Component:display.Bobs
or something like that. That would be nice, because then we could attach it to any flying Thangs, and we could remove the special-case code from the WizardSprite, too. All thatdisplay.Bobs
would need to do is attach abobs
or maybebobsUpAndDown
property to the Thang, and the CocoSprite would read that instead ofisCollectable
. If we really wanted, we could configure the bob distance in that Component.The text was updated successfully, but these errors were encountered: