2024-04-22 01:49:24 +00:00
|
|
|
|
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 AnimationOffset_BodyTypeGendered : BaseAnimationOffset
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
public List<BodyTypeOffset> offsetsMale;
|
|
|
|
|
public List<BodyTypeOffset> offsetsFemale;
|
|
|
|
|
|
|
|
|
|
public override Vector3? getOffset(Pawn pawn)
|
|
|
|
|
{
|
|
|
|
|
if (pawn.gender == Gender.Female)
|
|
|
|
|
{
|
|
|
|
|
return offsetsFemale.Find(x => x.bodyType == pawn.story.bodyType)?.offset;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return offsetsMale.Find(x => x.bodyType == pawn.story.bodyType)?.offset;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
2024-04-23 20:53:13 +00:00
|
|
|
|
|
|
|
|
|
public override int? getRotation(Pawn pawn)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
if (pawn.gender == Gender.Female)
|
|
|
|
|
{
|
|
|
|
|
return offsetsFemale.Find(x => x.bodyType == pawn.story.bodyType)?.rotation;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return offsetsMale.Find(x => x.bodyType == pawn.story.bodyType)?.rotation;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
2024-04-22 01:49:24 +00:00
|
|
|
|
}
|
|
|
|
|
}
|