I have a few items that I would like to be able to drop into the world with different properties but they're all items that the player can pick up.
- Apple
- Orange
- Ore
- Log
They have some properties e.g. consumable.
I have a json for all my objects
{
'Apple': {
'consumable': true,
'asset_path': 'res://assets/items/apple.png'
},
'Log': {
'consumable': false,
'asset_path': 'res://assets/items/log.png'
}
}
What's the best way to structure this?
- A scene for each item specifically?
- One scene and instantiate the values programmatically?
If it's option 2, how do I go about it?
```
var item = Item.instance()
item.set_type('Log')
parent.add_child(item)
```
How about more complex scenes with timers and triggers? How do you make it more generic and "inheritable"? Thanks!