Improved adding and removal of anim events

This commit is contained in:
AbstractConcept 2022-09-17 19:06:33 -05:00
parent f0d46df3d6
commit 8523abf957
276 changed files with 1401 additions and 5422 deletions

View file

@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
namespace RimWorldAnimationStudio
{
public static class PawnUtility
{
public static Vector3 BaseHeadOffsetAt(string bodyType, int rotation)
{
Vector2 headOffset = Vector3.zero;
switch (bodyType)
{
case "Male": headOffset = new Vector2(0.04f, 0.34f); break;
case "Female": headOffset = new Vector2(0.10f, 0.34f); break;
case "Thin": headOffset = new Vector2(0.09f, 0.34f); break;
case "Hulk": headOffset = new Vector2(0.10f, 0.34f); break;
case "Fat": headOffset = new Vector2(0.09f, 0.34f); break;
}
switch (rotation)
{
case 0: return new Vector3(0f, 0f, headOffset.y);
case 1: return new Vector3(headOffset.x, 0f, headOffset.y);
case 2: return new Vector3(0f, 0f, headOffset.y);
case 3: return new Vector3(-headOffset.x, 0f, headOffset.y);
default: return Vector3.zero;
}
}
}
}