mirror of
https://gitgud.io/AbstractConcept/rimworld-animation-studio.git
synced 2024-08-15 00:43:27 +00:00
UI revisions
This commit is contained in:
parent
007e2dd513
commit
1e2c4fa6bf
68 changed files with 2516 additions and 1100 deletions
|
@ -48,25 +48,9 @@ namespace RimWorldAnimationStudio
|
|||
|
||||
curZoom += Input.GetAxis("Mouse ScrollWheel") * scrollSpeed * 0.1f;
|
||||
curZoom = Mathf.Clamp(curZoom, maxZoom, minZoom);
|
||||
|
||||
Vector3 cameraPosition = Vector3.Lerp(transform.position, new Vector3(x, y, -10), 0.2f);
|
||||
transform.position = cameraPosition;
|
||||
cam.orthographicSize = Mathf.Abs(curZoom);
|
||||
}
|
||||
|
||||
public void SetPosition(Vector3 position)
|
||||
{
|
||||
x = position.x;
|
||||
y = position.y;
|
||||
|
||||
transform.position = position;
|
||||
}
|
||||
|
||||
public void SetZoom(float zoom)
|
||||
{
|
||||
this.zoom = Mathf.Clamp(zoom, maxZoom, minZoom);
|
||||
}
|
||||
|
||||
public void StartMouseDrag()
|
||||
{
|
||||
Vector3 delta = cam.ScreenToWorldPoint(Input.mousePosition) - cam.transform.position;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue