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

49 lines
1.3 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Globalization;
using System.IO;
using System.Xml;
using System.Xml.Serialization;
using Verse;
using Rimworld_Animations;
namespace Rimworld_Animations_Patch
{
public class HandAnimationDef : Def
{
public AnimationDef animationDef;
public List<HandAnimationData> handAnimationData = new List<HandAnimationData>();
}
public class HandAnimationData
{
public int stageID = 0;
public int actorID = 0;
public int touchingActorID = -1;
public string targetBodyPart;
public string bodySide = "";
public List<string> targetBodyParts = new List<string>();
public string motion;
public int cycleTime = 0;
public bool mirror = false;
private HandMotion _motion;
public HandMotion Motion
{
get
{
if (_motion == null)
{
if (Type.GetType(motion) == null)
{ DebugMode.Message("ERROR: Hand motion " + motion + " does not exist!"); return null; }
_motion = (HandMotion)Activator.CreateInstance(Type.GetType(motion));
}
return _motion;
}
}
}
}