Replace TownSquare with HomeCamp art and land humanoid bots, LittleBear, and LmGirl review assets.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
|
||||
namespace AIGame.Review
|
||||
{
|
||||
public sealed class BotAnimationSeekBar : MonoBehaviour, IPointerDownHandler, IDragHandler
|
||||
{
|
||||
public BotAnimationLab viewer;
|
||||
public void OnPointerDown(PointerEventData e) => Seek(e);
|
||||
public void OnDrag(PointerEventData e) => Seek(e);
|
||||
void Seek(PointerEventData e)
|
||||
{
|
||||
var rect = (RectTransform)transform;
|
||||
if (viewer && RectTransformUtility.ScreenPointToLocalPointInRectangle(rect, e.position, e.pressEventCamera, out var p))
|
||||
viewer.Seek(Mathf.InverseLerp(rect.rect.xMin, rect.rect.xMax, p.x));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user