Bug fixes (issues #1, 2, 3 and 6)

This commit is contained in:
AbstractConcept 2022-10-02 00:42:07 -05:00
parent 6b44db7400
commit 518a912ef1
156 changed files with 352 additions and 625 deletions

View file

@ -23,6 +23,7 @@ namespace RimWorldAnimationStudio
private PawnAnimationClip clip;
private PawnKeyframe keyframe;
private float dragTimeStart = -1f;
public void Initialize(AnimationTimeline timeline, int actorID, int keyframeID)
{
@ -47,7 +48,7 @@ namespace RimWorldAnimationStudio
keyframe.atTick = (int)value;
clip.BuildSimpleCurves();
AnimationController.Instance.stageTick = keyframe.atTick.Value;
//AnimationController.Instance.stageTick = keyframe.atTick.Value;
timeline.InitiateUpdateOfGhostFrames();
}
@ -104,9 +105,11 @@ namespace RimWorldAnimationStudio
public void OnBeginDrag(PointerEventData eventData)
{
AnimationController.Instance.stageTick = keyframe.atTick.Value;
//AnimationController.Instance.stageTick = keyframe.atTick.Value;
Workspace.actorID = actorID;
Workspace.keyframeID = keyframeID;
dragTimeStart = Time.unscaledTime;
}
public override void OnDrag(PointerEventData eventData)
@ -114,9 +117,12 @@ namespace RimWorldAnimationStudio
if (keyframe.atTick == 1)
{ value = 1; return; }
if (Time.unscaledTime - dragTimeStart < 0.05f) return;
interactable = true;
base.OnDrag(eventData);
AnimationController.Instance.stageTick = keyframe.atTick.Value;
//AnimationController.Instance.stageTick = keyframe.atTick.Value;
Workspace.actorID = actorID;
}
@ -125,6 +131,7 @@ namespace RimWorldAnimationStudio
if (keyframe.atTick == 1)
{ value = 1; return; }
interactable = false;
Workspace.Instance.RecordEvent("Keyframe tick");
}