30 lines
1020 B
C#
30 lines
1020 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using RimWorld;
|
|
using Verse;
|
|
|
|
namespace Rimworld_Animations {
|
|
public abstract class BaseAnimationClip
|
|
{
|
|
public Dictionary<int, string> SoundEffects = new Dictionary<int, string>();
|
|
public List<ThingDef> types; //types of participants
|
|
public int duration;
|
|
/** <returns>failure - if 'true', this clip should not be used</returns> */
|
|
public abstract bool BuildSimpleCurves(bool isGenitalAngleMandatory = false);
|
|
public string soundDef = null; //for playing sounds
|
|
public int actor;
|
|
public List<string> tags = new List<string>();
|
|
|
|
protected bool EmitMandatoryCurveEmptyError(SimpleCurve curve, string name) {
|
|
if (curve.PointsCount <= 0) {
|
|
Log.Error($"Mandatory curve '{name}' is empty in an animation clip!");
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
}
|
|
}
|