rimworld-animations/1.6/Source/Animations/AnimationOffsets/AnimationOffsetDef.cs
2025-09-02 08:42:53 -07:00

32 lines
680 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
using Verse;
namespace Rimworld_Animations
{
public class AnimationOffsetDef : Def
{
public List<BaseAnimationOffset> offsets;
public bool FindOffset(Pawn pawn, out BaseAnimationOffset offset)
{
foreach (BaseAnimationOffset animOffset in offsets)
{
if (animOffset.appliesToPawn(pawn)) {
offset = animOffset;
return true;
}
}
offset = null;
return false;
}
}
}