mirror of
https://github.com/AssetRipper/AssetRipper.git
synced 2025-12-11 20:15:29 +01:00
28 lines
774 B
C#
28 lines
774 B
C#
using AssetRipper.SourceGenerated.Subclasses.BlendTreeConstant;
|
|
using AssetRipper.SourceGenerated.Subclasses.StateConstant;
|
|
|
|
namespace AssetRipper.SourceGenerated.Extensions
|
|
{
|
|
public static class StateConstantExtensions
|
|
{
|
|
public static bool IsBlendTree(this IStateConstant stateConstant)
|
|
{
|
|
if (stateConstant.BlendTreeConstantArray.Count == 0)
|
|
{
|
|
return false;
|
|
}
|
|
return stateConstant.GetBlendTree().NodeArray.Count > 1;
|
|
}
|
|
|
|
public static IBlendTreeConstant GetBlendTree(this IStateConstant stateConstant)
|
|
{
|
|
return stateConstant.BlendTreeConstantArray[0].Data;
|
|
}
|
|
|
|
public static bool GetWriteDefaultValues(this IStateConstant stateConstant)
|
|
{
|
|
return !stateConstant.Has_WriteDefaultValues() || stateConstant.WriteDefaultValues;
|
|
}
|
|
}
|
|
}
|