Chuyển tới nội dung chính

ProjectVCharacterEquipment class

One piece of equipment from the catalog, owned or not: its slot, level and next upgrade price. Read-only.

Namespace: SilverTiger.ProjectV.Unity.Presentation.Character

public sealed class ProjectVCharacterEquipment

Constructors​

ProjectVCharacterEquipment(ProjectVEquipmentId id, ProjectVEquipmentSlotId slot, long level, long maxLevel, bool owned, bool equipped, IReadOnlyList<ProjectVCharacterCost> upgradeCosts)​

Creates an equipment entry, for example in tests.

public ProjectVCharacterEquipment(ProjectVEquipmentId id, ProjectVEquipmentSlotId slot, long level, long maxLevel, bool owned, bool equipped, IReadOnlyList<ProjectVCharacterCost> upgradeCosts);

Parameters

NameTypeDescription
idProjectVEquipmentIdThe equipment's ID.
slotProjectVEquipmentSlotIdThe slot it goes in.
levellongThe current level; 1 or more (1 when not owned).
maxLevellongThe highest level; at least level.
ownedboolTrue when the player owns it.
equippedboolTrue when it is equipped.
upgradeCostsIReadOnlyList<ProjectVCharacterCost>The price of the next level; empty when it cannot be upgraded.

Exceptions

ExceptionWhen
ArgumentOutOfRangeExceptionlevel is below 1 or maxLevel is below level.
ArgumentNullExceptionupgradeCosts is null.

Properties​

PropertyTypeDescription
IdProjectVEquipmentIdThe equipment's ID.
SlotProjectVEquipmentSlotIdThe slot this equipment goes in, such as the primary weapon slot.
LevellongThe current level; 1 when the player does not own it.
MaxLevellongThe highest level this equipment can reach.
OwnedboolTrue when the player owns this equipment. Show unowned entries as locked.
EquippedboolTrue when this equipment is equipped.
UpgradeCostsIReadOnlyList<ProjectVCharacterCost>The price of the next level; empty when it is not owned or already at its maximum level.