An abstract class in Root.Township, the global namespace.
Base for an asset that adds data to an Item, such as CookableItem. Can be limited to some physical materials.
Constructors
| Member | What it is |
|---|
protected ItemComponent() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
1 private and internal field
| Member | What it is |
|---|
private List<PhysicalMaterial> physicalMaterials | Materials this component applies to; empty means all. Checked by CheckMatch. |
Properties
| Member | What it is |
|---|
Item Item { get; private set; } | The item this component is attached to, set when the item initializes. |
Methods
| Member | What it is |
|---|
bool CheckMatch(PhysicalMaterial physicalMaterial) | Whether this component applies to a physical material. True if none are listed or the material is null. |
1 private and internal method
| Member | What it is |
|---|
private void IItemComponent.Initialize(Item item) | Stores the item this component belongs to in Item. |
Used in
Members of other types that take, return or hold a ItemComponent: