using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Globalization; using System.IO; using System.Xml; using UnityEngine; using Verse; namespace Rimworld_Animations_Patch { public class StrokeGenitalsUpAndDown_FacingEW : HandMotion { public override Vector3 GetHandPosition(Pawn pawn, HandAnimationData handAnimationData, float baseAngle) { Vector3 handPosition = new Vector3(); ActorAnimationData data = pawn.GetAnimationData(); float p = Mathf.PingPong(data.stageTicks, handAnimationData.cycleTime) / handAnimationData.cycleTime; float size = HandAnimationUtility.GetGenitalSize(pawn, handAnimationData.targetBodyPart) * 0.2f; float m = (data.actorFacing == Rot4.West ? -1f : 1f) * (handAnimationData.mirror ? -1f : 1f); handPosition.x = Mathf.Sin(m * (baseAngle + 45f) / 180f * Mathf.PI) * size * p; handPosition.z = Mathf.Cos(m * (baseAngle + 45f) / 180f * Mathf.PI) * size * p; return handPosition; } } }