4dad9e5d5b
- BeatSageUploader: audio_url 지원(UploadFromUrl), PollAndDownload 공통화, ZIP 500 오류 3회 재시도 - BeatSageConverter: info.dat 파싱(SongMetadata), BPM 자동 감지 → 노트 타이밍 변환에 적용 - SongCreatorManager: title/BPM 필수 입력 제거, 난이도 4개 자동 선택, GenerateFlowFromUrl 버그 수정 - NasPublisher: audioPath null 허용(URL 흐름에서 로컬 파일 없는 경우 스킵) - .gitignore/.gitattributes 초기 설정 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
74 lines
1.9 KiB
C#
74 lines
1.9 KiB
C#
using UnityEngine;
|
|
using System.Collections;
|
|
|
|
namespace VRBeats
|
|
{
|
|
public class RotPartController : MonoBehaviour
|
|
{
|
|
[SerializeField] private Ease ease = Ease.Linear;
|
|
[SerializeField] private float animTime = 2.0f;
|
|
|
|
private Transform[] childArray = null;
|
|
|
|
private bool open = false;
|
|
|
|
private void Awake()
|
|
{
|
|
childArray = new Transform[ transform.childCount ];
|
|
|
|
for (int n = 0; n < transform.childCount; n++)
|
|
{
|
|
childArray[n] = transform.GetChild(n);
|
|
}
|
|
|
|
//PlayRotAnimation(10.0f);
|
|
//yield return new WaitForSeconds(10.0f);
|
|
//Reverse(10.0f);
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
if (Input.GetKeyDown(KeyCode.J))
|
|
{
|
|
if (open)
|
|
{
|
|
Reverse(0.0f);
|
|
}
|
|
else
|
|
{
|
|
PlayRotAnimation(10.0f);
|
|
}
|
|
|
|
open = !open;
|
|
}
|
|
|
|
}
|
|
|
|
public void PlayRotAnimation(float rotAmount)
|
|
{
|
|
float step = rotAmount;
|
|
|
|
for (int n = 0; n < childArray.Length; n++)
|
|
{
|
|
childArray[n].RotateTween(Vector3.forward , step * ( childArray.Length - n ) , animTime ).SetEase(ease);
|
|
childArray[n].ScaleTween( new Vector3(1.0f , 1.0f , 0.0f) , animTime ).SetEase(ease);
|
|
}
|
|
|
|
}
|
|
|
|
public void Reverse(float rotAmount)
|
|
{
|
|
float step = rotAmount;
|
|
|
|
for (int n = 0; n < childArray.Length; n++)
|
|
{
|
|
childArray[n].RotateTween(Vector3.forward, step * (childArray.Length - n), animTime).SetEase(ease);
|
|
childArray[n].ScaleTween(new Vector3(1.0f, 1.0f, 4.0f), animTime).SetEase(ease);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|