mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-10 19:55:09 +00:00
c00b6f46c3
* ghosts are scaled now * Lockstep fully reworked * mr. bach has been implemented * Space dance fixes * oops * Tap trial rework part 1 * tap trial rework part 2 * oopsie * Gramps Talk Update * Space Dance Voice Offsets * Giraffe done! (Except miss anim) * bg is not showing up for some reason * bg not rendering fixed + giraffe fixed * scrolling done * fixed space dance and space soccer bg scrolls * fixed rockers bugs * adjustment * fixed el inaccuracies * particle fix * changed pitch and volume of monkey tap * miss anim * megamix face for girl * Proper miss anim implementation * Added force stepping event * miss anim fix --------- Co-authored-by: saladplainzone <chocolate2890mail@gmail.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
29 lines
847 B
C#
29 lines
847 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace HeavenStudio.Common
|
|
{
|
|
public class CanvasScroll : MonoBehaviour
|
|
{
|
|
[SerializeField] RawImage[] _imgs;
|
|
|
|
public float NormalizedX = 0.0f;
|
|
public float NormalizedY = 0.0f;
|
|
public Vector2 Normalized { get { return new Vector2(NormalizedX, NormalizedY); } set { NormalizedX = value.x; NormalizedY = value.y; } }
|
|
|
|
public float TileX = 1.0f;
|
|
public float TileY = 1.0f;
|
|
public Vector2 Tile { get { return new Vector2(TileX, TileY); } set { TileX = value.x; TileY = value.y; } }
|
|
|
|
private void Update()
|
|
{
|
|
foreach (var img in _imgs)
|
|
{
|
|
img.uvRect = new Rect(Normalized * Tile, img.uvRect.size);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|