mirror of
https://gitgud.io/AbstractConcept/rimworld-animation-studio.git
synced 2024-08-15 00:43:27 +00:00
Extra keybinds
This commit is contained in:
parent
e210923733
commit
c3c0a05ac0
139 changed files with 586 additions and 233 deletions
|
@ -20,7 +20,9 @@ namespace RimWorldAnimationStudio
|
|||
public static ActorManipulationMode actorManipulationMode = ActorManipulationMode.Pan;
|
||||
public static ActorBodyPart selectedBodyPart;
|
||||
|
||||
static int _actorID = 0;
|
||||
public static List<PawnKeyframe> copiedKeyframes = new List<PawnKeyframe>();
|
||||
|
||||
private static int _actorID = 0;
|
||||
public static int actorID { get { return Mathf.Clamp(_actorID, 0, animationDef.actors.Count - 1); } set { _actorID = value; } }
|
||||
|
||||
public static int StageWindowSize
|
||||
|
@ -109,6 +111,38 @@ namespace RimWorldAnimationStudio
|
|||
return animationDef.animationStages[stageID].animationClips[actorID].keyframes.Any(x => x.atTick == atTick);
|
||||
}
|
||||
|
||||
public PawnKeyframe GetNextKeyframe(int actorID)
|
||||
{
|
||||
PawnKeyframe pawnKeyframe = null;
|
||||
PawnAnimationClip clip = GetPawnAnimationClip(actorID);
|
||||
|
||||
int stageTick = AnimationController.Instance.stageTick;
|
||||
|
||||
foreach (PawnKeyframe keyframe in clip.keyframes)
|
||||
{
|
||||
if (keyframe.atTick > stageTick)
|
||||
{ pawnKeyframe = keyframe; break; }
|
||||
}
|
||||
|
||||
return pawnKeyframe;
|
||||
}
|
||||
|
||||
public PawnKeyframe GetPreviousKeyframe(int actorID)
|
||||
{
|
||||
PawnKeyframe pawnKeyframe = null;
|
||||
PawnAnimationClip clip = GetPawnAnimationClip(actorID);
|
||||
|
||||
int stageTick = AnimationController.Instance.stageTick;
|
||||
|
||||
foreach (PawnKeyframe keyframe in clip.keyframes)
|
||||
{
|
||||
if (keyframe.atTick < stageTick)
|
||||
{ pawnKeyframe = keyframe; }
|
||||
}
|
||||
|
||||
return pawnKeyframe;
|
||||
}
|
||||
|
||||
public PawnKeyframe GetCurrentOrPreviousKeyframe(int actorID)
|
||||
{
|
||||
PawnKeyframe pawnKeyframe = null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue