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 offsets; public Vector3 FindOffset(Pawn pawn) { foreach (BaseAnimationOffset animOffset in offsets) { if (animOffset.appliesToPawn(pawn)) { Vector3? offset = animOffset.getOffset(pawn); return (offset == null ? Vector3.zero : (Vector3)offset); } } return Vector3.zero; } } }