Extendable Item class
Opened this issue · 1 comments
saricden commented
Create an Item
class that extends Image
(or Sprite
, if animated), and adds some extra metadata during it's instantiation. So it can have a physics body if instantiated in a Level
class, but can also be used in UI (possibly drag n drop bag) w/o physics.
Metadata we're going to track per Item
class:
Sprite
key and animation key (if applicable)- Add to physics to just add (physics body || UI mode)
- Money value in whatever our mid-apocalyptic currency will be
- Meta info like
name
,description
, etc. isMaterial
boolean
If isMaterial: true
:
- Engineering attribute & value (will design system for engineering in future issue)
saricden commented
Item class should have mode boolean: uiMode
(which is to say, physics is disabled, and Item is placed wherever the UI calls for).