Class Cloth
Cloth for pose-style character (not for equipment items). Get instance with Cloth.TryGetCloth(id, out var result)
Properties
ClothID
Global unique id for this type of cloth
Declaration
public int ClothID { get; }
ClothName
Type name for this type of cloth
Declaration
public string ClothName { get; }
ClothSystemReady
Declaration
public static bool ClothSystemReady { get; }
ClothType
Where should characters wear this cloth
Declaration
public abstract ClothType ClothType { get; }
SheetIndex
Which artwork sheet does this cloth get it's artwork from
Declaration
public int SheetIndex { get; }
SpriteLoaded
True if the artwork sprites are loaded
Declaration
public virtual bool SpriteLoaded { get; }
Methods
AttachClothOn(BodyPart, AngeSprite, int, int, int, int, int, int, int, int, bool)
Attach the given artwork sprite as a general cloth to given bodypart. Cloth will use it's own size no matter how big the bodypart is.
Declaration
public static Cell[] AttachClothOn(BodyPart bodyPart, AngeSprite sprite, int locationX, int locationY, int localZ, int widthAmount = 1000, int heightAmount = 1000, int localRotation = 0, int shiftPixelX = 0, int shiftPixelY = 0, bool defaultHideLimb = true)
Parameters
Type | Name | Description |
---|---|---|
BodyPart | bodyPart | Target bodypart |
AngeSprite | sprite | Artwork sprite |
int | locationX | Position X in bodypart's local space |
int | locationY | Position Y in bodypart's local space |
int | localZ | Local Z value the sort rendering cells |
int | widthAmount | Horizontal size scaling (0 means 0%, 1000 means 100%) |
int | heightAmount | Vertical size scaling (0 means 0%, 1000 means 100%) |
int | localRotation | Rotation of the cloth in bodypart's local space |
int | shiftPixelX | Position offset X |
int | shiftPixelY | Position offset Y |
bool | defaultHideLimb | True if it requires the bodypart to be hiden. Artwork sprite's tag will override this value. |
Returns
Type | Description |
---|---|
Cell[] | Rendering cells which holds the cloth rendering data |
CoverClothOn(BodyPart, AngeSprite)
Cover the given artwork sprite as a general cloth to given bodypart. Size of the sprite will change based on how big the bodypart is.
Declaration
public static Cell[] CoverClothOn(BodyPart bodyPart, AngeSprite sprite)
Parameters
Type | Name | Description |
---|---|---|
BodyPart | bodyPart | Target bodypart |
AngeSprite | sprite | Artwork sprite |
Returns
Type | Description |
---|---|
Cell[] | Rendering cells which holds the cloth rendering data |
CoverClothOn(BodyPart, AngeSprite, int)
Cover the given artwork sprite as a general cloth to given bodypart. Size of the sprite will change based on how big the bodypart is.
Declaration
public static Cell[] CoverClothOn(BodyPart bodyPart, AngeSprite sprite, int localZ)
Parameters
Type | Name | Description |
---|---|---|
BodyPart | bodyPart | Target bodypart |
AngeSprite | sprite | Artwork sprite |
int | localZ | Local Z value the sort rendering cells |
Returns
Type | Description |
---|---|
Cell[] | Rendering cells which holds the cloth rendering data |
CoverClothOn(BodyPart, AngeSprite, int, Color32, bool)
Cover the given artwork sprite as a general cloth to given bodypart. Size of the sprite will change based on how big the bodypart is.
Declaration
public static Cell[] CoverClothOn(BodyPart bodyPart, AngeSprite sprite, int localZ, Color32 tint, bool defaultHideLimb = true)
Parameters
Type | Name | Description |
---|---|---|
BodyPart | bodyPart | Target bodypart |
AngeSprite | sprite | Artwork sprite |
int | localZ | Local Z value the sort rendering cells |
Color32 | tint | Color tint |
bool | defaultHideLimb | True if it requires the bodypart to be hiden. Artwork sprite's tag will override this value. |
Returns
Type | Description |
---|---|
Cell[] | Rendering cells which holds the cloth rendering data |
DrawCloth(PoseCharacterRenderer)
Draw cloth for the given character
Declaration
public abstract void DrawCloth(PoseCharacterRenderer renderer)
DrawClothGizmos(IRect, Color32, int)
Draw cloth as gizmos
Declaration
public virtual void DrawClothGizmos(IRect rect, Color32 tint, int z)
Parameters
Type | Name | Description |
---|---|---|
IRect | rect | Rect position in global space |
Color32 | tint | Color tint |
int | z | Z value for sort rendering cell |
FillFromSheet(string)
Load sprite data from Renderer.CurrentSheet
Declaration
public virtual bool FillFromSheet(string name)
ForAllCloth()
Iterate through all cloth instance in pool
Declaration
public static IEnumerable<KeyValuePair<int, Cloth>> ForAllCloth()
GetDefaultClothID(int, ClothType)
Get ID of given character's default cloth. Return 0 if not found
Declaration
public static int GetDefaultClothID(int characterID, ClothType suitType)
GetDisplayName(out int)
Get display name for this cloth from language system.
Declaration
public string GetDisplayName(out int languageID)
HasCloth(int)
Does cloth with given id exists in the pool
Declaration
public static bool HasCloth(int clothID)
TryGetCloth(int, out Cloth)
Get cloth instance from pool
Declaration
public static bool TryGetCloth(int clothID, out Cloth cloth)