Class Hair
Hair gadget for pose styled characters
Properties
DropMotionAmountForBraid
Amount of the braid's animation generate when character rise and drop (0 means 0%, 1000 means 100%)
Declaration
protected virtual int DropMotionAmountForBraid { get; }
FlowAmountX
Amount of the horizontal flow animation generate from character's movements (0 means 0%, 1000 means 100%)
Declaration
protected virtual int FlowAmountX { get; }
FlowAmountY
Amount of the vertical flow animation generate from character's movements (0 means 0%, 1000 means 100%)
Declaration
protected virtual int FlowAmountY { get; }
FlowMotionAmountForBraid
Amount of the braid's motion animation for hairs flowing in air (0 means 0%, 1000 means 100%)
Declaration
protected virtual int FlowMotionAmountForBraid { get; }
ForceBackOnFlowForBraid
Set to true will make braid rendered in backside when it flows
Declaration
protected virtual bool ForceBackOnFlowForBraid { get; }
GadgetType
Type of this body gadget
Declaration
public override sealed BodyGadgetType GadgetType { get; }
Overrides
MotionAmountForBraid
Amount of the braid's rotating animation generate from character's movements (0 means 0%, 1000 means 100%)
Declaration
protected virtual int MotionAmountForBraid { get; }
SpriteBraidLeft
Artwork sprite of left braid
Declaration
public OrientedSprite SpriteBraidLeft { get; }
SpriteBraidRight
Artwork sprite of right braid
Declaration
public OrientedSprite SpriteBraidRight { get; }
SpriteHairBackward
Artwork sprite rendering in the back-side of character's head
Declaration
public OrientedSprite SpriteHairBackward { get; }
SpriteHairForward
Artwork sprite rendering in the front-side of character's head
Declaration
public OrientedSprite SpriteHairForward { get; }
SpriteLoaded
True if artwork sprite is loaded
Declaration
public override bool SpriteLoaded { get; }
Overrides
UseLimbRotateForBraid
Make braids perform limb rotate instead of simply rotate the rendering cell
Declaration
protected virtual bool UseLimbRotateForBraid { get; }
Methods
DrawBraid(PoseCharacterRenderer, bool, OrientedSprite, OrientedSprite, int, int, int, bool, int, int)
Draw given sprites as braids for given character
Declaration
public static void DrawBraid(PoseCharacterRenderer renderer, bool forceBackOnFlow, OrientedSprite spriteLeft, OrientedSprite spriteRight, int motionAmount, int flowMotionAmount, int dropMotionAmount, bool useLimbRotate, int offsetX, int offsetY)
Parameters
Type | Name | Description |
---|---|---|
PoseCharacterRenderer | renderer | Target character |
bool | forceBackOnFlow | Set to true will make braid rendered in backside when it flows |
OrientedSprite | spriteLeft | Artwork sprite on the left side |
OrientedSprite | spriteRight | Artwork sprite on the right side |
int | motionAmount | Motion animation amount |
int | flowMotionAmount | Motion animation amount for hairs flowing in air |
int | dropMotionAmount | Motion animation amount from character's rise and drop |
bool | useLimbRotate | Perform limb rotate instead of simply rotate the rendering cell |
int | offsetX | Position offset X |
int | offsetY | Position offset Y |
DrawGadget(PoseCharacterRenderer)
Render the gadget for the given character
Declaration
public override void DrawGadget(PoseCharacterRenderer renderer)
Overrides
DrawGadgetFromPool(PoseCharacterRenderer)
Draw hair gadget for given character
Declaration
public static void DrawGadgetFromPool(PoseCharacterRenderer renderer)
DrawGadgetGizmos(IRect, Color32, int)
Render the gadget as gizmos
Declaration
public override void DrawGadgetGizmos(IRect rect, Color32 tint, int z)
Parameters
Type | Name | Description |
---|---|---|
IRect | rect | Global rect position |
Color32 | tint | Color tint |
int | z | Z position for sorting |
Overrides
DrawSpriteAsHair(PoseCharacterRenderer, OrientedSprite, OrientedSprite, int, int)
Draw given sprites as hair for given character
Declaration
public static void DrawSpriteAsHair(PoseCharacterRenderer renderer, OrientedSprite spriteForward, OrientedSprite spriteBackward, int flowAmountX, int flowAmountY)
Parameters
Type | Name | Description |
---|---|---|
PoseCharacterRenderer | renderer | Target character |
OrientedSprite | spriteForward | Hair artwork sprite for the front-side |
OrientedSprite | spriteBackward | Hair artwork sprite for the back-side |
int | flowAmountX | Horizontal motion animation amount for hairs flowing in air |
int | flowAmountY | Vertical motion animation amount for hairs flowing in air |
FillFromSheet(string)
Load sprite data from Renderer.CurrentSheet
Declaration
public override bool FillFromSheet(string name)