Class BlockPicker
Item that represent a map tool inside inventory. Also handles the pick block from map logic
Implements
Properties
AllowPickBackgroundBlock
True if the tool can pick background blocks from map
Declaration
public virtual bool AllowPickBackgroundBlock { get; }
AllowPickBlockEntity
True if the tool can pick entity blocks from map
Declaration
public virtual bool AllowPickBlockEntity { get; }
AllowPickLevelBlock
True if the tool can pick level blocks from map
Declaration
public virtual bool AllowPickLevelBlock { get; }
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
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
DropItemAfterPicked
True if the tool create an ItemHolder holds the block after pick the block
Declaration
public virtual bool DropItemAfterPicked { get; }
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
MouseUnitRange
Range limitation for mouse in unit space
Declaration
public virtual int MouseUnitRange { get; }
PerformDelayRate
How many frame based on "duration" does the internal tool logic invoke after character start to use the tool. (0 means immediately invoke. 1000 means invoke after "duration" frames)
Declaration
public override int PerformDelayRate { 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
UseMouseToPick
True if the tool allow user to use mouse
Declaration
public virtual bool UseMouseToPick { get; }
UseStackAsUsage
True if this tool treat it's inventory stack count as durability bar
Declaration
public override bool UseStackAsUsage { 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
DrawPickTargetHighlight(int, int, bool)
Draw the UI cursor for target block
Declaration
protected virtual void DrawPickTargetHighlight(int unitX, int unitY, bool hasTarget)
Parameters
Type | Name | Description |
---|---|---|
int | unitX | Position in unit space |
int | unitY | Position in unit space |
bool | hasTarget | True if target map block founded |
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)