rimworld-animations-patch_m.../Source/Scripts/HandMotions/StrokeGenitalsUpAndDownShort_FacingNS.cs
AbstractConcept 38ec4f86c1 v 2.0.0
2023-02-04 01:13:57 -06:00

34 lines
952 B
C#

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 System.Xml.Serialization;
using UnityEngine;
using Verse;
using RimWorld;
namespace Rimworld_Animations_Patch
{
public class StrokeGenitalsUpAndDownShort_FacingNS : 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 length = 0.035f;
handPosition.x = 0;
handPosition.z = length * p;
handPosition = handPosition.RotatedBy(baseAngle);
return handPosition;
}
}
}