mirror of
https://gitgud.io/c0ffeeeeeeee/rimworld-animations.git
synced 2024-08-15 00:43:45 +00:00
32f3b1522f
offsets, dynamically set in animation animation prop graphics, absolute positioning, changing textures, can be used in animation
33 lines
703 B
C#
33 lines
703 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using UnityEngine;
|
|
using Verse;
|
|
|
|
namespace Rimworld_Animations
|
|
{
|
|
public class AnimationOffsetDef : Def
|
|
{
|
|
|
|
public List<BaseAnimationOffset> offsets;
|
|
|
|
public Vector3 FindOffset(Pawn pawn)
|
|
{
|
|
foreach (BaseAnimationOffset animOffset in offsets)
|
|
{
|
|
if (animOffset.appliesToPawn(pawn)) {
|
|
|
|
Vector3? offset = animOffset.getOffset(pawn);
|
|
return (offset == null ? Vector3.zero : (Vector3)offset);
|
|
|
|
}
|
|
}
|
|
|
|
return Vector3.zero;
|
|
}
|
|
|
|
|
|
}
|
|
}
|