Class WeightComponent
Used to track the total weight of an inventory.
Inheritance
System.Object
WeightComponent
Assembly: Eco.Gameplay.dll
Syntax
public class WeightComponent : InventoryComponent, IController, IViewController, IHasUniversalID
Constructors
WeightComponent(Int32)
Declaration
public WeightComponent(int maxWeight)
Parameters
Type |
Name |
Description |
System.Int32 |
maxWeight |
|
Properties
MaxWeight
Represents the max weight this inventory can support.
Declaration
public int MaxWeight { get; }
Property Value
Type |
Description |
System.Int32 |
|
Weight
Represents the true modified weight of this inventory.
Declaration
public int Weight { get; }
Property Value
Type |
Description |
System.Int32 |
|
Methods
ApplyChange(Item, Int32)
Declaration
public override void ApplyChange(Item item, int quantityDelta)
Parameters
Type |
Name |
Description |
Item |
item |
|
System.Int32 |
quantityDelta |
|
Overrides
EndChangeSetModification(Boolean)
Declaration
public override void EndChangeSetModification(bool successful)
Parameters
Type |
Name |
Description |
System.Boolean |
successful |
|
Overrides
Initialize(Inventory)
Declaration
public override void Initialize(Inventory inventory)
Parameters
Overrides
SetMaxWeight(Int32)
Declaration
public void SetMaxWeight(int maxWeight)
Parameters
Type |
Name |
Description |
System.Int32 |
maxWeight |
|
Implements
Extension Methods