Class BlockBuilder
Item that represent a map block inside inventory. Also handles the build block to map logic
Implements
Constructors
BlockBuilder(int, string, BlockType, int)
Declaration
public BlockBuilder(int blockID, string blockName, BlockType blockType, int maxStackCount)
Properties
AvailableWhenClimbing
True if character can use this tool when climbing
Declaration
public override bool AvailableWhenClimbing { get; }
Overrides
AvailableWhenSliding
True if character can use this tool when sliding on wall
Declaration
public override bool AvailableWhenSliding { get; }
Overrides
AvailableWhenSquatting
True if character can use this tool when squatting
Declaration
public override bool AvailableWhenSquatting { get; }
Overrides
AvailableWhenWalking
True if character can use this tool when walking
Declaration
public override bool AvailableWhenWalking { get; }
Overrides
BlockID
ID of the block it holds
Declaration
public int BlockID { get; init; }
BlockType
Type of the block it holds
Declaration
public BlockType BlockType { get; init; }
DefaultMovementSpeedRateOnUse
How fast can the character move when using this tool. (0 means do not move. 1000 means move as normal speed. null means do not effect movement speed.)
Declaration
public override int? DefaultMovementSpeedRateOnUse { get; }
Overrides
Duration
How long does the tool perform it's function for once
Declaration
public override int Duration { get; }
Overrides
MaxStackCount
Count limitation for multiple items inside one inventory slot
Declaration
public override int MaxStackCount { get; }
Overrides
RunningMovementSpeedRateOnUse
How fast can the character move when using this tool when running. (0 means do not move. 1000 means move as normal speed. null means do not effect movement speed.)
Declaration
public override int? RunningMovementSpeedRateOnUse { get; }
Overrides
WalkingMovementSpeedRateOnUse
How fast can the character move when using this tool when walking. (0 means do not move. 1000 means move as normal speed. null means do not effect movement speed.)
Declaration
public override int? WalkingMovementSpeedRateOnUse { get; }
Overrides
Methods
DrawItem(Entity, IRect, Color32, int)
Call this function to render the item
Declaration
public override void DrawItem(Entity holder, IRect rect, Color32 tint, int z)
Parameters
Type | Name | Description |
---|---|---|
Entity | holder | Holder that own this item |
IRect | rect | Rect position in global space |
Color32 | tint | Color tint |
int | z | Z value for sort rendering cells |
Overrides
GetHandheldPoseAnimationID(Character)
Get the ID of the pose animation for handheld
Declaration
public override int GetHandheldPoseAnimationID(Character character)
Overrides
GetPerformPoseAnimationID(Character)
Get the ID of the pose animation for using the tool
Declaration
public override int GetPerformPoseAnimationID(Character character)
Overrides
OnPoseAnimationUpdate_FromEquipment(PoseCharacterRenderer)
This function is called every frame when a pose-style character equipping this item
Declaration
public override void OnPoseAnimationUpdate_FromEquipment(PoseCharacterRenderer rendering)
Overrides
OnToolPerform(Character)
This function is called when this tool is used for once by the given character
Declaration
public override void OnToolPerform(Character sender)