CosmeticBodyType
A class in Root.Township, Alta.Customization.
Customization part that sets the character's body type: animator body shape plus belt dock and stat bar spacing. Client-side visuals, part of a body type cosmetic definition.
- Listed in Customization and screenshots
- Inherits or implements
CustomizationVisualPart<CustomizationArguments>
Constructors
| Member | What it is |
|---|---|
CosmeticBodyType() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
| Member | What it is |
|---|---|
static readonly int BodyType | Hash of the animator integer parameter BodyType. |
5 private and internal fields
Properties
| Member | What it is |
|---|---|
int BodyTypeIndex { get; } | Index of this body type (0 to 7). Even indices are feminine shapes, odd are masculine, going small, medium, buff, large. |
bool IsMasculine { get; } | Whether this is a masculine body type. CosmeticHairPart uses it to pick the chance of rolling no hair. |
float PouchBeltDocksDistanceRatio { get; } | Scale for how far the pouch belt docks sit from the body. |
float ToolBeltDocksDistanceRatio { get; } | Scale for how far the tool belt docks sit from the body. |
Methods
| Member | What it is |
|---|---|
static void ApplyToAnimator(Animator animator, int bodyTypeIndex) | Sets the animator's BodyType integer, jumps it to the matching state (F_small, M_small and so on up to index 7) and updates it once. |
protected override void Attach(ICustomizationHandler handler, CustomizationArguments arguments) | Applies the body type to the handler's character dummy: animator integer, tool belt, pouch belt and stat bar distance ratios, and the cosmetic packer's body type index. |
protected override void ChangeArguments(ICustomizationHandler handler, CustomizationArguments arguments) | Does nothing; body types take no arguments. |
protected override void Detach(ICustomizationHandler handler) | Does nothing; the next body type overwrites the values. |