Code refactor

This commit is contained in:
AbstractConcept 2022-10-27 00:56:04 -05:00
parent cd4711a8e5
commit 757badf4f6
517 changed files with 2534 additions and 2221 deletions

View file

@ -1,26 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
namespace RimWorldAnimationStudio
{
public class SnapToKeyframe : MonoBehaviour, IDragHandler
{
private Slider slider;
public void Start()
{
slider = GetComponent<Slider>();
}
public void OnDrag(PointerEventData eventData)
{
int targetTick = Workspace.FindClosestKeyFrameAtTick((int)slider.value, Mathf.CeilToInt(Workspace.StageWindowSize * 0.01f));
if (Input.GetKey(KeyCode.LeftShift))
{ slider.value = (float)targetTick; }
}
}
}