chore: Assets 디렉토리 구조 정리 및 네이밍 컨벤션 적용
- Assets/_Game/ 하위로 게임 에셋 통합 - External/ 패키지 벤더별 분류 (Synty, Animations, UI) - 에셋 네이밍 컨벤션 확립 및 적용 (Data_Skill_, Data_SkillEffect_, Prefab_, Anim_, Model_, BT_ 등) - pre-commit hook으로 네이밍 컨벤션 자동 검사 추가 - RESTRUCTURE_CHECKLIST.md 작성 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
50
Assets/External/UI/InterfaceFantasyWarriorHUD/Samples/Scripts/SampleScrollUV.cs
vendored
Normal file
50
Assets/External/UI/InterfaceFantasyWarriorHUD/Samples/Scripts/SampleScrollUV.cs
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
// Copyright (c) 2024 Synty Studios Limited. All rights reserved.
|
||||
//
|
||||
// Use of this software is subject to the terms and conditions of the Synty Studios End User Licence Agreement (EULA)
|
||||
// available at: https://syntystore.com/pages/end-user-licence-agreement
|
||||
//
|
||||
// Sample scripts are included only as examples and are not intended as production-ready.
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Synty.Interface.FantasyWarriorHUD.Samples
|
||||
{
|
||||
/// <summary>
|
||||
/// Animates the UVs of a raw image for a scrolling background effect.
|
||||
/// </summary>
|
||||
public class SampleScrollUV : MonoBehaviour
|
||||
{
|
||||
[Header("References")]
|
||||
public RawImage rawImage;
|
||||
|
||||
[Header("Parameters")]
|
||||
public Vector2 speed = new Vector2(1, 0);
|
||||
public Vector2 size = new Vector2(256, 256);
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
if (rawImage == null)
|
||||
{
|
||||
rawImage = GetComponent<RawImage>();
|
||||
}
|
||||
}
|
||||
|
||||
private void Reset()
|
||||
{
|
||||
rawImage = GetComponent<RawImage>();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
Vector2 calculatedSizeBasedOnScreen = new Vector2(
|
||||
rawImage.rectTransform.rect.width / size.x,
|
||||
rawImage.rectTransform.rect.height / size.y
|
||||
);
|
||||
rawImage.uvRect = new Rect(
|
||||
rawImage.uvRect.position + (speed * Time.deltaTime),
|
||||
calculatedSizeBasedOnScreen
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user